Older Version
Newer Version
GerdIsenberg
Nov 28, 2016
[[toc]] **[[Home]] * [[Programming]] * [[Languages]] * D-Programming Language** **D** is a programming language developed by [[https://en.wikipedia.org/wiki/Walter_Bright|Walter Bright]] from [[https://en.wikipedia.org/wiki/Digital_Mars|Digital Mars]] <ref>[[http://www.bitwisemag.com/copy/programming/d/interview/d_programming_language.html|The D Programming Language - Walter Bright Interview]] by [[http://www.bitwisemag.com/copy/bios/bio_huw_collingbourne.html|Huw Collingbourne]] and [[http://www.bitwisemag.com/copy/bios/bio_dermot_hogan.html|Dermot Hogan]], [[http://www.bitwisemag.com/index.html|Bitwise Magazine]]</ref> <ref>[[http://www.computerworld.com.au/article/253741/a-z_programming_languages_d/?fp=4194304&fpid=1|The A-Z of Programming Languages: D - Walter Bright talks about D and his desire to improve on systems programming language]], [[Computerworld]]</ref> . The first stable version was released 2007. Walter Bright designed many other compilers as the first native compiler, the [[https://en.wikipedia.org/wiki/Zortech|Zortech]] [[Cpp|C++]] compiler, the [[https://en.wikipedia.org/wiki/Symantec|Symantec]] C++ compiler, and the Digital Mars C++ Compiler and many [[C]] compilers (as the [[https://en.wikipedia.org/wiki/Datalight|Datalight]] C compiler). D is in the Top 30 of the [[https://en.wikipedia.org/wiki/TIOBE_index|TIOBE index]] <ref>[[http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html|TIOBE Software: Tiobe Index]]</ref> . =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 [[Cpp|C++]] quirks * has all **modern concepts** of [[https://en.wikipedia.org/wiki/Interpreted_language|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= 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 =Suitable for Chess Programming= <span style="line-height: 1.5;">Althought it looks like D has tons of advantages over C/C++ in terms if a modern language, two problems might be woth to know</span> * It has been reported that D is not as good in bit fiddeling as C / C++ if you are using chess magic * It is unknown if the garbage collector has any impact on predictable results D has the following native features: * Easy string handling * Static and dynamic [[Array|arrays]] + [[Hash Table|hashes]] * [[https://en.wikipedia.org/wiki/Function_overloading|Overloading]], default parameters, varargs * Nested functions (as Macros) * Classes and inheritance and Modules/Mixins and templates * Advanced testing features as contract programming and class invariants * [[Thread]] and [[https://en.wikipedia.org/wiki/Fiber_%28computer_science%29|fiber]] support (actors in work) * [[https://en.wikipedia.org/wiki/Exception_handling|Exception handling]] * Automatic or explicit [[https://en.wikipedia.org/wiki/Garbage_collection_%28computer_science%29|garbage collection]]: use internal GC or [[https://en.wikipedia.org/wiki/Malloc|free / malloc]] as you like. * [[https://en.wikipedia.org/wiki/Closure_%28computer_science%29|Closures]] * Direct [[C]] access and normal debugger support * [[https://en.wikipedia.org/wiki/Design_by_contract|Contract programming]] * Subset of constructs for easy [[https://en.wikipedia.org/wiki/Functional_programming|functional programming]] * and much more... [[#DEngines]] =D Engines= Dynamic list with [[Guidance for Creating New Pages#Tags|tag]] 'dengine'. Engines (at least some versions) written in D: > [[include component="pageList" hideInternal="true" tag="dengine" limit="20" ]] =Publications= * [[https://en.wikipedia.org/wiki/Andrei_Alexandrescu|Andrej Alexandrescu]] (**2010**). //[[http://www.bestwebbuys.com/The-D-Programming-Language-ISBN-9780321635365?isrc=-rd|The D Programming Language]]//. [[https://en.wikipedia.org/wiki/Addison-Wesley|Addison-Wesley]] Professional. ISBN [[https://en.wikipedia.org/wiki/Special:BookSources/978-0321635365|978-0321635365]] =Forum Posts= * [[http://www.digitalmars.com/d/archives/digitalmars/D/gdc_and_the_Computer_Language_Benchmarks_Game_55053.html#N55053|digitalmars.D - gdc and the Computer Language Benchmarks Game]] by [[Guido Schimmels]], [[http://dlang.org/index.html|digitalmars.D]], June 28, 2007 * [[http://talkchess.com/forum/viewtopic.php?topic_view=threads&p=414767&t=39683|Re: c vs c++]] by [[Brian Haskin]], [[CCC]], July 14, 2011 * [[http://programmers.stackexchange.com/questions/97207/what-does-c-do-better-than-d|programming languages - What does C++ do better than D? - Programmers - Stack Exchange]] =External Links= * [[http://www.digitalmars.com/d/|D Homepage]] * [[https://en.wikipedia.org/wiki/D_programming_language|D from Wikipedia]] * [[http://www.prowiki.org/wiki4d/wiki.cgi|Wiki4D: FrontPage]] * [[http://www.learn-programming.za.net/learn_d_programming.html|Learn D Programming]] * [[http://www.dsource.org/projects/tutorials/wiki/TutorialFundamentals|TutorialFundamentals - tutorials - dsource.org]] * [[http://digitalmars.com/d/2.0/type.html|Language Description]] * [[https://bitbucket.org/goshawk/gdc/wiki/Home|goshawk / gdc / wiki / Home — Bitbucket]] =References= <references /> =What links here?= [[include page="D-Proglanguage" component="backlinks" limit="40"]] **[[Languages|Up one Level]]**