D (Programming Language)

Home * Programming * Languages * D-Programming Language

D, a programming language developed by Walter Bright from Digital Mars . The first stable version was released 2007. Walter Bright designed many other compilers as the first native compiler, the Zortech C++ compiler, the Symantec C++ compiler, and the Digital Mars C++ Compiler and many C compilers (as the Datalight C compiler). Andrej Alexandrescu joined the design and development effort in 2007. D is a distinct language and has redesigned some core C++ features, while also sharing characteristics from Java, Python, Ruby, C#, and Eiffel. D is in the Top 20 of the TIOBE index.

=Design Principles= The design principles have been to write a compiler for a language that:
 * is fast without any compromise
 * has a clean syntax free of the C++ quirks
 * has all modern concepts of interpreted languages. In fact D has some Ruby + Python elements that make programming fun.
 * is easy to learn for C and C++ programmers

=Native Features=
 * Easy string handling
 * Static and dynamic arrays + hashes
 * Overloading, default parameters, varargs
 * Direct C access and debugger support
 * Contract programming
 * Subset of constructs for easy functional programming
 * Nested functions (as Macros)
 * Classes and inheritance and Modules/Mixins and templates
 * Advanced testing features as contract programming and class invariants
 * Thread and fiber support (actors in work)
 * Exception handling
 * Automatic or explicit garbage collection: use internal GC or free / malloc as you like.
 * Closures
 * and more...

=Suitable for Chess Programming= D might be a competitive choice for chess programming because:
 * The performance / speed is comparable to C / C++
 * It has ulong (8 bytes) and is very data-type rich

Althought it looks like D has advantages over C/C++ in terms if a modern language, two possible problems might be worth to know
 * Bit-twiddling optimizations
 * Impact of Garbage collection on predictable results

=D Engines=
 * Chess Engines written in D

=Publications=
 * Andrej Alexandrescu (2010). The D Programming Language. Addison-Wesley Professional

=Forum Posts=
 * digitalmars.D - gdc and the Computer Language Benchmarks Game by Guido Schimmels, digitalmars.D, June 28, 2007
 * Re: c vs c++ by Brian Haskin, CCC, July 14, 2011
 * programming languages - What does C++ do better than D? - Programmers - Stack Exchange

=External Links=
 * Home - D Programming Language
 * D from Wikipedia
 * Wiki4D: FrontPage
 * ntro - D Programming Language 2.0 - Digital Mars
 * GDC - D Programming Language for GCC
 * D-Programming-GDC · GitHub
 * DConf 2019 Day 1 Keynote: Allocating Memory with the D Programming Language - Walter Bright, YouTube Video

=References= Up one Level