D is a multi-paradigm systems programming language developed by Walter Bright and, since 2006, Andrei Alexandrescu. Now, D is an open source collaboration.
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 and functional, and offers tools for disciplined template-based metaprogramming. It's a member of the C syntax family.
The current version of D (technically D2), a non-backwards compatible successor, is feature complete and has become the official version under support.
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.
External Resources
Tag usage
When posting questions about D programming, please make sure to include target system and compiler information. This includes the compiler name (eg. dmd, ldc, gdc), version and settings used to compile.