D is a SystemProgramming language developed by WalterBright. Its focus is on combining the power and high performance of CeeLanguage and CeePlusPlus with the programmer productivity of modern languages like RubyLanguage and PythonLanguage. Special attention is given to the needs of concurrency, reliability, documentation, quality assurance, management and portability.
The D language uses StaticTyping and compiles directly to machine code. It supports many programming styles: imperative, object oriented, and metaprogramming. It's a member of the C syntax family, and its appearance is very similar to that of C++.
A book, TheDeeProgrammingLanguage by AndreiAlexandrescu, was recently released and has been seen as an important step forward for D. (Chapter 13 "Concurrency in the D Programming Language" is available as free read online: http://www.informit.com/articles/article.aspx?p=1609144 )
There are two versions of D in use. D1 achieved stable status in 2007 and D2, a non-backwards compatible successor is nearly feature complete and is currently in the final stages of development.
Latest versions are D1.075 and D2.060 (Aug 2012)
Useful pages:
(Not to be confused with TutorialDee.)
Hello World in D
import std.stdio; void main() { writeln("Hello World!"); }
Community
Discussion of the D language and its development is on news://news.digitalmars.com in a number of groups:
The news groups can also be read in a web browser at http://forum.dlang.org
The IRC channel #d at freenode.net is frequented by the D core dev team
I looked at it and I think it is a great language. It is small and simple, OO like Java but native executables (60 KB+), GC, interfaces, templates, closures, enums, dynamic arrays, hashes, switch(string) and a lot more. I have installed a wiki to support Walter's creation: http://www.prowiki.org/wiki4d/wiki.cgi (350+ pages in Aug04). -- HelmutLeitner
According to BjarneStroustrup, there have been at least a dozen languages called D. http://www.research.att.com/~bs/bs_faq.html
Interesting, I was just yesterday thinking that it would be nice to be able to declare functions inside functions to support the simplification of complex if/then/else statements using ExtractMethod refactoring. The idea here is to simplify/clarify the situation where you need to use a large number of local variables in a complex logical comparison and want to keep the expression(s) in the if/then/else statement(s) as short/simple/clear as possible. Without something that allows you to extract a method but still allow access to the local variables of the enclosing function scope, you are left with either passing everything you need into the extracted method (which often confuses things as much as just leaving the messy logical expression in-place), or making all the variables needed in the extracted method(s) instance variables of the enclosing class (confusing, too). Reading the D Language "Quick Comparison" table, I noticed that it supports the notion of "Nested Functions" which allow exactly the behavior desired. Serendipity is an interesting thing... -- GeoffSobering
See NestedScopes.
Being able to nest function definitions is nice for all kinds of reasons (with full-strength LexicalScoping, please), but in the scenario you describe, isn't the code trying to tell you that you're missing one or more classes with responsibility for the logic in the expression? Depending on what the result of the expression is for, maybe Strategy or State would be good patterns to use here. And anyway, isn't the better solution to "the situation where you need to use a large number of local variables in a complex logical comparison" to factor the code so that you only have a small number of local variables involved in a simple logical comparison?
See also SymantecCpp DigitalMars
As a CeePlusPlus programmer, the thing I like most about D is that it has both GarbageCollection and automatic("stack") objects, which you can use to manage resources.
Indeed, the main emphasis of it is, I believe, to take the good bits of C++ and remove the crud, i.e., compatibility with CeeLanguage, platform dependent type sizes and preprocessor. While adding in various c++ features that exist at the library level into the core language, i.e., garbage collection, strings, collections.
D looks like a fantastic language, but it's not enough of an improvement over C++ to get me to learn it. If I want speed, I can be fairly productive in C++ using BoostLibraries et al. If I don't care much about speed, there are much more productive and high-level languages I can use like RubyLanguage or PythonLanguage. D seems to be in an uncomfortable middle area: equivalent or slightly slower performance than CeeCeePlusPlus but not substantially more productive.
If D had better standard libraries including a well-designed portable GUI frontend, I'd consider it for desktop app development. I think it could see some success there or in games, but only with more library work.
AndreiAlexandrescu has written a book, TheDeeProgrammingLanguage.