Official DMD compiler written in D

Philippe Sigaud philippe.sigaud at gmail.com
Wed Jan 9 04:28:59 PST 2013


On Wed, Jan 9, 2013 at 12:05 PM, Timon Gehr <timon.gehr at gmx.ch> wrote:
> Yes, it is in D. Nothing is released yet. It needs to be polished a little
> so that there are no known embarrassing shortcomings anymore.

What? That's FOSS, release early, release often!

> (DMD chokes on both.)
>
> Furthermore, I need to implement exceptions, modules, and some parts of
> compile time reflection + tons of really small features. (Where all
> ambiguities and contradictions are detected according to well-defined rules
> instead of resolved or choked on randomly as DMD likes to do.)

Makes me salivate.


> Also, it obviously needs a repl. :-)

Obviously.

And direct programmatic access to the lexer and the parser. I'm coding
a macro system for D right now, as an over-layer above DMD (like rdmd)
and having to create the AST by myself to transform them according to
the user-defined macros is a pain.

> CTFE is basically done (as a portable byte code interpreter, but other
> strategies, such as JIT, could be easily plugged).

Great!

> This is a snippet of my regression test suite:
>
> auto dynRangePrimes(){
>     DynRange!int impl(int start)=>
>
> dynRange(cons(start,delay(()=>filter!(a=>a%start)(impl(start+1)))));
>     return impl(2);
> }
>
> static assert(array(take(dynRangePrimes(), 20)) ==
> [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71]);

Lazy recursive range, right? As the usual Haskell definition for a
prime generator. Nice!

> I also need to decide on a licence.

Unless you've reason not to, I'd advise using the same as Phobos: Boost.

> I assume that the alpha will be out in late spring. (I am busy until early spring.)

You can count me in to test it (I gather to prefer to code this as you
see fit, right now). You could also present it at the D conf.


In any cases, congratulations for what seems to be a elegantly done D
implementation.


More information about the Digitalmars-d mailing list