Official DMD compiler written in D

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Jan 9 10:44:09 PST 2013


On Wed, Jan 09, 2013 at 12:05:55PM +0100, Timon Gehr wrote:
> On 01/08/2013 10:06 PM, Philippe Sigaud wrote:
[...]
> >Also, Timon Gehr spoke of his own front-end (assumed to be in D) in the
> >past, but did not provide any link to it.
> >
> 
> 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.
[...]
> CTFE is basically done (as a portable byte code interpreter, but
> other strategies, such as JIT, could be easily plugged). 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]);
> 
> )

Whoa!!! Now you really caught my interest!

Can it handle CTFE-computed mixins that declare and reference variables?
If it can, I will finally be able to write a library AA implementation
that allows static AA literals (no runtime init/allocation needed)!


T

-- 
Meat: euphemism for dead animal. -- Flora


More information about the Digitalmars-d mailing list