dmd 2.029 release
Michel Fortin
michel.fortin at michelf.com
Tue Apr 21 17:43:59 PDT 2009
On 2009-04-21 11:18:39 -0400, Don <nospam at nospam.com> said:
> Yes. Actually, marking a nested function as pure doesn't make much sense.
> It's entirely equivalent to moving it outside the function; a nested
> pure function shouldn't be able to access any members of the enclosing
> function, otherwise it's not pure. But DMD doesn't enforce that, and so
> it creates inefficient and possibly buggy code.
What about immutable local variables? A pure function can access
immutable globals, so it should be able to access immutable locals too.
--
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/
More information about the Digitalmars-d-announce
mailing list