DMD 1.014 release

Jarrett Billingsley kb3ctd2 at yahoo.com
Fri Apr 27 07:03:55 PDT 2007


"Walter Bright" <newshound1 at digitalmars.com> wrote in message 
news:f0s9gr$u05$1 at digitalmars.com...
> Sports associative array literals, and struct literals. This enables 
> compile time function execution to work with symbol tables (AA's) and user 
> defined types.
>
> http://www.digitalmars.com/d/changelog.html
>
> http://ftp.digitalmars.com/dmd.1.014.zip

Yay for struct literals, but now static and dynamic initialization of 
structs are completely different.  Static looks like this:

static S s = {a : 1, b : 2, c : 3};

and dynamic:

S s = S(1, 2, 3);

Not only do they look completely different, but you also can't use named 
members with the dynamic syntax like you can with the static.

Is there any ambiguity to the syntax:

S s = S{a : 1, c : 3, b : 2};

That is, just an Ident followed by a static struct initializer? 





More information about the Digitalmars-d-announce mailing list