D is a programming language created in 2001 by Walter Bright and Andrei Alexandrescu.
#81on PLDB | 22Years Old | 6.3kUsers |
2Books | 4Papers | 13kRepos |
The D programming language is an object-oriented, imperative, multi-paradigm system programming language created by Walter Bright of Digital Mars and released in 2001. Bright was joined in the design and development effort in 2007 by Andrei Alexandrescu. Though it originated as a re-engineering of C++, D is a distinct language, having redesigned some core C++ features while also taking inspiration from other languages, notably Java, Python, Ruby, C#, and Eiffel. Read more on Wikipedia...
// Type your code here, or load an example.
int square(int num) {
return num * num;
}
import std.stdio;
void main()
{
writeln("Hello, world!");
}
// Hello World in D
import std.stdio;
void main()
{
writefln("Hello World!");
}
unittest
{
}
1 import std.stdio, std.algorithm, std.range, std.string;
2
3 void main()
4 {
5 dstring[][dstring] signs2words;
6
7 foreach(dchar[] w; lines(File("words.txt")))
8 {
9 w = w.chomp().toLower();
10 immutable key = w.dup.sort().release().idup;
11 signs2words[key] ~= w.idup;
12 }
13
14 foreach(words; signs2words)
15 if(words.length > 1)
16 writefln(words.join(" "));
17 }
Feature | Supported | Token | Example |
---|---|---|---|
Binary Literals | ✓ | // 0[Bb][01_]+ |
|
Integers | ✓ | // (0|[1-9][0-9_]*)([LUu]|Lu|LU|uL|UL)? |
|
Floats | ✓ | // 0[xX]([0-9a-fA-F_]*\.[0-9a-fA-F_]+|[0-9a-fA-F_]+)[pP][+\-]?[0-9_]+[fFL]?[i]? |
|
Hexadecimals | ✓ | // 0[xX][0-9a-fA-F_]+ |
|
Octals | ✓ | // 0[0-7_]+ |
|
Strings | ✓ | " | "Hello world" |
MultiLine Comments | ✓ | /+ +/ | /+ A comment +/ |
Print() Debugging | ✓ | printf | |
Line Comments | ✓ | // | // A comment |
Templates | ✓ | template TCopy(T) { void copy(out T to, T from) { to = from; } } int i; TCopy!(int).copy(i, 3); |
|
Type Inference | ✓ | ||
Operator Overloading | ✓ | ||
Comments | ✓ | ||
Pointers | ✓ | ||
Case Insensitive Identifiers | X | ||
Semantic Indentation | X |
title | authors | year | publisher |
---|---|---|---|
The D Programming Language | Alexandrescu, Andrei | 2010 | Addison-Wesley Professional |
D Cookbook | Ruppe, Adam D. | 2014 | Packt Publishing |
title | authors | year | citations | influentialCitations |
---|---|---|---|---|
Implementation of a Compressible-Flow Simulation Code in the D Programming Language | P. Jacobs and R. Gollan | 2016 | 32 | 1 |
Incorporation Of A 3 D Interactive Graphics Programming Language Into An Introductory Engineering Course | J. Snook and V. Lohani and J. Lo and Kishore Sirvole and Jennifer Mullins and J. Kaeli and H. Griffin | 2005 | 11 | 0 |
Origins of the D programming language | W. Bright and Andrei Alexandrescu and M. Parker | 2020 | 6 | 1 |
Parallelizing power system contingency analysis using D programming language | S. Khaitan and J. McCalley | 2013 | 5 | 0 |