[dmd-beta] beta 2

David Simcha dsimcha at gmail.com
Wed Jul 6 14:12:22 PDT 2011


On Wed, Jul 6, 2011 at 5:09 PM, Walter Bright <walter at digitalmars.com>wrote:


> This is what I have difficulty with. Consider:
>
>    pure void foo(int* p) { *p = 3; }
>
> That isn't pure, or weakly pure.
>

???? Yes it is.  It can be called from a strongly pure function without
violating purity  (Any argument passed to foo is local to the strongly pure
function, since the arguments have to be immutable and it can't access
mutable global or static variables.)  Isn't that the definition of weakly
pure?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/dmd-beta/attachments/20110706/62dc6ac6/attachment.html>


More information about the dmd-beta mailing list