Memory allocation purity

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Thu May 15 14:41:23 PDT 2014


On 05/15/2014 11:33 PM, Walter Bright wrote:
> On 5/15/2014 9:07 AM, Timon Gehr wrote:
>> Why? A memoizable function is still memoizable if it is changed
>> internally to
>> memoize values in global memory, for example.
>
> I doubt a compiler could prove it was pure.
>

Yes, that was actually my point. Memoizable is actually a non-trivial 
property.

(But note that while a compiler cannot in general discover a proof, it 
could just _check_ a supplied proof.)


More information about the Digitalmars-d mailing list