Difference between revisions of "D"
Jump to navigation
Jump to search
(→Compilers: New homepage for gdc) |
(Some of this stuff was waaaay outdated. Like, by years.) |
||
Line 4: | Line 4: | ||
D has an imperative core, but is a multi-paradigm language that includes support for object-orientated, functional, and generic programming. | D has an imperative core, but is a multi-paradigm language that includes support for object-orientated, functional, and generic programming. | ||
== Advantages == | == Advantages == | ||
Line 15: | Line 13: | ||
* Supports the functional programming paradigm better than other C-like languages, with features such as closures, delegates, transitive immutability, higher order functions, anonymous functions, and the ability to write compiler enforced pure functions. | * Supports the functional programming paradigm better than other C-like languages, with features such as closures, delegates, transitive immutability, higher order functions, anonymous functions, and the ability to write compiler enforced pure functions. | ||
* D2 tries to do the template metaprogramming thing, which C++ supports without really meaning to, in a way that's actually sane to use. | * D2 tries to do the template metaprogramming thing, which C++ supports without really meaning to, in a way that's actually sane to use. | ||
* DMD, the | * DMD builds code incredibly fast, making compile-edit-run cycles comparable to dynamic languages. | ||
* Knowledgeable, helpful community (including the D.learn forum for asking questions). | |||
* Unicode native - make a ??????() function, or instantiate define a ????!T; the basic string type is UTF-8. | |||
* A package registry (http://code.dlang.org/) | |||
== Disadvantages == | == Disadvantages == | ||
* | * There aren't as many libraries available if you want pure D implementations. | ||
* The language is mostly stable, but still has breaking changes on rare occasion. | |||
* The language is still | * Documentation sometimes abstruse or lacking examples; paucity of beginner learning resources. | ||
* | |||
== Compilers == | == Compilers/Tooling == | ||
* DMD ( | * DMD (reference compiler; bleeding edge feature support) - http://dlang.org/download.html | ||
* GDC ( | * GDC (GCC backend; targets the most platforms) - http://gdcproject.org/ | ||
* LDC ( | * LDC (LLVM backend; usually builds the fastest binaries) - http://wiki.dlang.org/LDC | ||
* Dub (Package manager and build tool) - http://code.dlang.org/download | |||
* IDEs and IDE plugins - http://wiki.dlang.org/IDEs | |||
* Editor support - http://wiki.dlang.org/Editors | |||
* Other stuff (debugging, profiling, fixup, etc.) - http://wiki.dlang.org/Development_tools | |||
== Roguelike Libraries == | == Roguelike Libraries == | ||
Bindings for [[libtcod]] - http://code.google.com/p/libtcod-d/ | * Bindings for [[libtcod]] - http://code.google.com/p/libtcod-d/ | ||
* Interface to ncurses - https://github.com/D-Programming-Deimos/ncurses | |||
* Adam Ruppe's arsd collection (simpledisplay, terminal, eventloop, database, script, etc.) - https://github.com/adamdruppe/arsd | |||
* Terminal ANSI colour lib - http://code.dlang.org/packages/rainbow | |||
* Parser for Tiled maps - http://code.dlang.org/packages/dtiled | |||
== D Roguelikes == | == D Roguelikes == | ||
Line 41: | Line 48: | ||
== Links == | == Links == | ||
* [http://www. | * [http://www.dlang.org/ Official Site] | ||
* [irc://irc.freenode.net/d IRC channel] | * [irc://irc.freenode.net/d IRC channel] | ||
* [http:// | * [http://wiki.dlang.org/ wiki] | ||
* [http:// | * [http://code.dlang.org/ DUB registry] | ||
[[Category:Programming languages]] | [[Category:Programming languages]] |
Revision as of 02:09, 12 June 2015
Introduction
D is static, compiled language influenced by C++. It was created by Walter Bright, author of the first C++ compiler to compile directly to machine code.
D has an imperative core, but is a multi-paradigm language that includes support for object-orientated, functional, and generic programming.
Advantages
- Fast language, with performance comparable to C++ while still being garbage collected by default.
- Interfaces well with C libraries, without writing boilerplate or using a foreign function interface, though cannot import headers unmodified - see http://www.digitalmars.com/d/2.0/htomodule.html
- Has a modern module system, no need to write header files or deal with a preprocessor.
- Syntax is familiar to C, C++, C#, Java etc programmers.
- Supports the functional programming paradigm better than other C-like languages, with features such as closures, delegates, transitive immutability, higher order functions, anonymous functions, and the ability to write compiler enforced pure functions.
- D2 tries to do the template metaprogramming thing, which C++ supports without really meaning to, in a way that's actually sane to use.
- DMD builds code incredibly fast, making compile-edit-run cycles comparable to dynamic languages.
- Knowledgeable, helpful community (including the D.learn forum for asking questions).
- Unicode native - make a ??????() function, or instantiate define a ????!T; the basic string type is UTF-8.
- A package registry (http://code.dlang.org/)
Disadvantages
- There aren't as many libraries available if you want pure D implementations.
- The language is mostly stable, but still has breaking changes on rare occasion.
- Documentation sometimes abstruse or lacking examples; paucity of beginner learning resources.
Compilers/Tooling
- DMD (reference compiler; bleeding edge feature support) - http://dlang.org/download.html
- GDC (GCC backend; targets the most platforms) - http://gdcproject.org/
- LDC (LLVM backend; usually builds the fastest binaries) - http://wiki.dlang.org/LDC
- Dub (Package manager and build tool) - http://code.dlang.org/download
- IDEs and IDE plugins - http://wiki.dlang.org/IDEs
- Editor support - http://wiki.dlang.org/Editors
- Other stuff (debugging, profiling, fixup, etc.) - http://wiki.dlang.org/Development_tools
Roguelike Libraries
- Bindings for libtcod - http://code.google.com/p/libtcod-d/
- Interface to ncurses - https://github.com/D-Programming-Deimos/ncurses
- Adam Ruppe's arsd collection (simpledisplay, terminal, eventloop, database, script, etc.) - https://github.com/adamdruppe/arsd
- Terminal ANSI colour lib - http://code.dlang.org/packages/rainbow
- Parser for Tiled maps - http://code.dlang.org/packages/dtiled