nice how D's pieces fit together

Jonathan M Davis jmdavisProg at gmx.com
Thu Mar 14 20:14:29 PDT 2013


On Friday, March 15, 2013 03:41:14 anonymous wrote:
> 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

It should be eventually, but there's still some key, low-level stuff 
(particularly in druntime) which isn't pure yet but should be eventually. And 
attribute inferrence will probably have to be improved as well for it to work. 
But we should get there eventually.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list