Difference between revisions of "D"

From RogueBasin
Jump to navigation Jump to search
m (typo)
(Some formatting fixes and additions to pro/cons)
Line 5: Line 5:
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.


'''NOTE:''' This article will deal with d2.0, the latest but still-in-development version)
'''NOTE:''' This article will deal with D2, the latest but still-in-development version)


== Advantages ==
== Advantages ==
Line 13: Line 13:
* Has a modern module system, no need to write header files or deal with a preprocessor.
* Has a modern module system, no need to write header files or deal with a preprocessor.
* Syntax is familiar to C, C++, [[C_Sharp|C#]], [[Java]] etc programmers.
* Syntax is familiar to C, C++, [[C_Sharp|C#]], [[Java]] etc programmers.
* Supports the functional programming better paradigm 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.
* DMD, the official compiler, is very fast, typically an order of magnitude faster than gcc for C/C++.
* DMD, the official compiler, is very fast, typically an order of magnitude faster than gcc for C/C++.


Line 22: Line 23:
* The language is still in development so has some rough edges.
* The language is still in development so has some rough edges.
* DMD, the official compiler, has no 64-bit support.
* DMD, the official compiler, has no 64-bit support.
* Other compilers than DMD don't really support D2 as of 2010-11.
* The community is divided between the stable but inactive D1 and the incompatible and still somewhat unstable D2.


== Compilers ==
== Compilers ==


* DMD (official compiler) - http://www.digitalmars.com/d/2.0/dmd-windows.html
* DMD (official compiler) - http://www.digitalmars.com/d/2.0/dmd-windows.html
*GDC (includes support for 64 bit) - http://bitbucket.org/goshawk/gdc/wiki/Home
* GDC (includes support for 64 bit) - http://bitbucket.org/goshawk/gdc/wiki/Home


== Roguelike Libraries ==
== Roguelike Libraries ==

Revision as of 10:41, 25 November 2010

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.

NOTE: This article will deal with D2, the latest but still-in-development version)

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, the official compiler, is very fast, typically an order of magnitude faster than gcc for C/C++.

Disadvantages

  • Paucity of tools such as IDE's, editor support, debuggers etc compared to more popular languages.
  • Documentation is scarce and incomplete (though this is somewhat offset by the knowledgeable community)
  • The language is still in development so has some rough edges.
  • DMD, the official compiler, has no 64-bit support.
  • Other compilers than DMD don't really support D2 as of 2010-11.
  • The community is divided between the stable but inactive D1 and the incompatible and still somewhat unstable D2.

Compilers

Roguelike Libraries

Bindings for libtcod - http://code.google.com/p/libtcod-d/

Links