"with" still sucks + removing features + adding features

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon May 18 21:05:03 PDT 2009


Derek Parnell wrote:
> But back to your question ... here is 'static' used with three different
> meanings within three lines of code.
> 
> -------
> module xyzzy;
> import std.stdio;
> 
> version(X) const int y = 1;
> else       const int y = -1;
>            
> static this() {
>    static if (y == 1) 
>       static int x = 0;
>    else
>       static int x = 42;
>  
>    writefln("X=%d Y=%d", x,y);
> }
> 
> void main()
> {
>    
> }
> 
> ----------
> 
> But maybe that's just me?

Doesn't confuse me one bit.

Andrei



More information about the Digitalmars-d mailing list