On 8 April 2013 14:40, Simen Kjaeraas <simen.kjaras@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';