How to use pure in D 2.0 question on Stack Overflow?

div0 div0 at users.sourceforge.net
Thu Jun 18 15:21:29 PDT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Walter Bright wrote:
> BCS wrote:
>> Reply to Jeroen,
>>
>>> Does anyone know the answer to this D related question on SO?
>>>
>>> http://stackoverflow.com/questions/1008803/how-to-use-pure-in-d-2-0/
>>>
>>
>> DMD can't tell that the method call is safe even though it is inpure.
> 
> Also, the purity of a function is determined by its signature, not by
> its implementation.

Surely the heap itself is global state?
So creating a new object should be forbidden.

- --
My enormous talent is exceeded only by my outrageous laziness.
http://www.ssTk.co.uk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFKOr3pT9LetA9XoXwRAtnUAKC7QklSOjnu/O57K2NfRMh7UkitKgCeIo9/
5M2DTIKLPzBW5Oa4UqfrZtw=
=cYCg
-----END PGP SIGNATURE-----



More information about the Digitalmars-d mailing list