To help LDC/GDC
Iain Buclaw
ibuclaw at ubuntu.com
Mon Apr 8 08:16:14 PDT 2013
On 8 April 2013 14:40, Simen Kjaeraas <simen.kjaras at gmail.com> wrote:
> On 2013-04-08, 13:46, Iain Buclaw wrote:
>
> Only builtins are pure in the sense of 'C'. Even functions considered
>> PUREstrong by the frontend may update an internal state, so the rules just
>> don't apply. Except for maybe global functions... In any case, the only
>> benefit you can reap from 'D pure' functions are that they are more likely
>> to be const-folded / inlined.
>>
>
> What?!?
>
> Please give an example of this. What sort of internal state are we
> talking about here?
It might be weakly pure. ;)
--
Iain Buclaw
*(p < e ? p++ : p) = (c & 0x0f) + '0';
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130408/e70bc89c/attachment.html>
More information about the Digitalmars-d
mailing list