nice how D's pieces fit together

anonymous anonymous at example.com
Thu Mar 14 19:41:14 PDT 2013


On Friday, 15 March 2013 at 02:31:32 UTC, anonymous wrote:
> Then it struck me:
> The compiler doesn't know that f's return value is unknown to 
> the rest of the world, because f isn't marked pure.
> And, indeed, make f pure and it just works: int[] f() pure 
> {return [1, 2, 3];} immutable v = f();
>
> Awesome!

And it would be even more awesomer if std.array.array was pure 
... bummer


More information about the Digitalmars-d-learn mailing list