It seems pure ain't so pure after all

Tommi tommitissari at hotmail.com
Sun Sep 30 23:09:38 PDT 2012


On Monday, 1 October 2012 at 06:01:24 UTC, Jonathan M Davis wrote:
>
> It would be kind of like complaining that a pure function 
> returns different
> values on Linux and Windows due to a version statement or 
> static if. It's just
> that in the thing that varies is compile time vs runtime not 
> the target
> machine. e.g.


Actually... let's not even worry about the definition of the word 
'pure'. Let's just ask ourselves: do we really want to live in a 
world where people can write code like that:

void main()
{
     auto x = pow2(3);
     enum y = pow2(3);

     assert(x == y + 3);

     writeln("Take that mr. \"math\" professor!");
     readln();
}


More information about the Digitalmars-d mailing list