Memory allocation purity

luka8088 via Digitalmars-d digitalmars-d at puremagic.com
Thu May 15 04:24:11 PDT 2014


On 15.5.2014. 13:04, Jonathan M Davis via Digitalmars-d wrote:
> On Thu, 15 May 2014 10:48:07 +0000
> Don via Digitalmars-d <digitalmars-d at puremagic.com> wrote:
> 
>> Yes. 'strong pure' means pure in the way that the functional
>> language crowd means 'pure'.
>> 'weak pure' just means doesn't use globals.
>>
>> But note that "strong purity" isn't an official concept, it was
>> just the terminology I used when explain to Walter what I meant.
>> I don't like the term because it's rather misleading
>> -- in reality you could define a whole range of purity strengths
>> (more than just two).
>> The stronger the purity, the more optimizations you can apply.
> 
> Yeah, I agree. The problem is that it always seems necessary to use the terms
> weak pure to describe the distinction - or maybe I just suck at coming up with
> a better way to describe it than you did initially. Your recent post in this
> thread talking about @noglobal seems to be a pretty good alternate way to
> explain it though. Certainly, the term pure throws everyone off at first.
> 
> - Jonathan M Davis
> 

Yeah, +1.

Or @isolated, as in "isolated from outer scopes".



More information about the Digitalmars-d mailing list