dmd 1.054 and 2.038 release

Sönke Ludwig ludwig_nospam at informatik.uni-luebeck.de
Sat Jan 2 02:58:58 PST 2010


Am 31.12.2009 19:48, schrieb Walter Bright:
> Happy New Year!
>
> http://www.digitalmars.com/d/1.0/changelog.html
> http://ftp.digitalmars.com/dmd.1.054.zip
>
>
> http://www.digitalmars.com/d/2.0/changelog.html
> http://ftp.digitalmars.com/dmd.2.038.zip
>
> Many thanks to the numerous people who contributed to this update.

Great to see so many fixes that make the language much more hassle-free 
to use - especially for newcomers that hit such things for the first 
time. However, I have at least one blocker problem in this release:

Because of the now disallowed struct initializers for structs with 
constructors (bug 3476), there is no way to use those structs as static 
immutable values as the constructors are not CTFE processable.

(-> Error: cannot evaluate ((X __ctmp2;
) , __ctmp2).this() at compile time)

This problem has been there since struct constructors have been 
introduced. A quick search on bugzilla did not return a matching
bug report, only some other issues related to struct constructors. I'll 
file a bug report if noone else knows of any existing one (technically 
this would be an 'improvement', but I think it is a really important issue).

This exact place in my code (something like struct Vector(S){ static 
invariant Vector zero = Vector(0, 0); }) had to be modified after almost 
every compiler release and also rendered a lot of versions useless for 
me because there was somtimes no real workaround.

BTW: I was not really watching the newsgroups lately and just noticed 
the DIP2/inout implementation. IMO 'inout' is really not a good choice 
for the keyword, introducing a backwards imcompatibility, changing the 
meaning of a de-facto standard keyword (IDL etc) and not really hitting 
the point (placeholder for const/immutable/nothing). Also if I did not 
know about the concept of DIP2 such code would have been a mystery for me.

Sönke


More information about the Digitalmars-d-announce mailing list