[dmd-beta] beta 2

Walter Bright walter at digitalmars.com
Wed Jul 6 21:47:22 PDT 2011



On 7/6/2011 9:45 PM, Don Clugston wrote:
> On 7 July 2011 03:12, Jason House<jason.james.house at gmail.com>  wrote:
>> On Jul 6, 2011, at 6:02 PM, Walter Bright<walter at digitalmars.com>  wrote:
>>
>> On 7/6/2011 2:12 PM, David Simcha wrote:
>>
>> 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
>>
>> Yes, but it is not pure itself.
>>
>> Eek! Walter, I think you have a severe misunderstanding of Don's weak/strong
>> purity concept. Doing a quick google search, I found the following
>> link: http://www.mail-archive.com/digitalmars-d@puremagic.com/msg40808.html
> Walter, I don't know what's happened here. You seem to have forgotten
> the whole point, somehow.
> The whole point of the 'weak pure' concept was that, provided a
> function doesn't directly access global variables, it is OK for it to
> be called from a strongly pure function.
> If a function is weakly pure, that means pretty much nothing. You
> can't do any optimization with it, etc.
> The one and only thing is gives you, is that it can safely be called
> from a strongly pure function.
> You seem to be removing weak purity from the language???
>

I put up a new beta with it back in.


More information about the dmd-beta mailing list