Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The D programming language is just under 10 years old. Its unique features include transitive const (everything reachable from a const object is also const), compile time function evaluation, and the ability to annotate functions as pure and have them statically checked by the compiler for side effects visible outside the function. Also included is a template system that puts C++ templates, Java/C# generics, etc. to shame:</p> <ol> <li>Variadic templates that "just work" for unlimited numbers of arguments.</li> <li>Strings, floating point numbers, and function aliases can be template parameters.</li> <li>The <code>static if</code> statement, similar to what exists on paper in C++0x, is actually implemented and works.</li> <li>String and template mixins, which allow the injection of arbitrary parametrized boilerplate code into any place in your source, and for arbitrary compile time code generation. In the extreme case, this has been used by Don Clugston to build a matrix math library that actually parsed code given as string literals at compile time and generated optimal inline assembly code for these operations, before the compiler's code generation stage.</li> <li>Structs can be represented as tuples, allowing iteration over their fields. This allows for some interesting generic programming with structs.</li> <li>Ridiculously powerful compile-time reflection/introspection. I once wrote a function template that could deep copy any struct as long as no runtime polymorphic class objects (which compile time reflection simply <strong>can't</strong> work on) were involved. This was done using only compile time reflection. No runtime type information was used.</li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload