D is a systems programming language developed by Walter Bright and since 2006 Andrei Alexandrescu. Its focus is on combining the power and high performance of C and C++ with the programmer productivity of modern languages like Ruby and Python. Special attention is given to the needs of concurrency, reliability, documentation, quality assurance, management and portability.
Overview
D is a systems programming language developed by Walter Bright and since 2006 Andrei Alexandrescu. Its focus is on combining the power and high performance of C and C++ with the programmer productivity of modern languages like Ruby and Python. Special attention is given to the needs of concurrency, reliability, documentation, quality assurance, management and portability.
The D language is statically typed and compiles directly to machine code. It supports many programming styles: imperative, object oriented, functional, and metaprogramming. It's a member of the C syntax family, and its appearance is very similar to that of C++.
There are currently two versions of D:
Version 1 achieved stable status in 2007 and was discontinued on December 31, 2012.
Version 2, a non-backwards compatible successor is feature complete and currently in the final stages of development.
Hello world in D
import std.stdio;
void main()
{
writeln("Hello, world!");
}
Design Goals of D
- Make it easier to write code that is portable from compiler to compiler, machine to machine, and operating system to operating system.
- Eliminate undefined and implementation defined behaviors as much as practical.
- Provide syntactic and semantic constructs that eliminate or at least reduce common mistakes.
- Reduce or even eliminate the need for third party static code checkers.
- Support memory safe programming.
- Support multi-paradigm programming, i.e. at a minimum support imperative, structured, object oriented, generic and even functional programming paradigms.
- Make doing things the right way easier than the wrong way.
- Have a short learning curve for programmers comfortable with programming in C, C++, Java or C#.
- Provide low level bare metal access as required.
- Provide a means for the advanced programmer to escape checking as necessary.
- Be compatible with the local C application binary interface.
- Have a context-free grammar, i.e. successful parsing must not require semantic analysis.
- Easily support writing internationalized applications.
- Incorporate Contract Programming and Unit Testing methodology.
- Be able to build lightweight, standalone programs.
- Reduce the costs of creating documentation.