The D programming language reference article from the English Wikipedia on 24-Apr-2004
(provided by Fixed Reference: snapshots of Wikipedia from wikipedia.org)

D programming language

For thoughtful child sponsors

There have been several programming languages called D during the history of computing. [1]

Currently, arguably, the most interesting one is that created by Walter Bright. This language aspires to take the positive features of C, C++ and a few other Algol syntax based programming languages, and to drop the negative features.

D drops archaic C++ features like the preprocessor and forward declarations. It adds modern features like design by contract, unit testing, true modules, automatic memory management, first class arrays, closures, and a reengineered template syntax. D retains C++'s ability to do low level coding, and adds to it with support for an integrated inline assembler. C++ multiple inheritance is replaced by single inheritance with interfaces. D's declaration, statement and expression syntax closely matches C++.

The inline assembler is typical of the differentiation between D and application languages like Java and C#. An inline assembler allows a programmer to enter machine-specific assembly code alongside standard D code—a technique often used by systems programmers to access the low-level features of the microprocessor needed to run programs that interface directly with the underlying hardware, such as operating systems and device drivers.

Unlike Java, D does allow the programmer to overload operators.

Example

// D program to print 'hello world' followed by its command line arguments

int main(char[][] args)
{
   printf("hello world\
");
   for (int i = 0; i < args.length; i++)
       printf("arg[%d] = '%.*s'\
", i, args[i]);
   return 0;
}

External Links

This article is a stub. You can help Wikipedia by expanding it.