A purity change
bearophile
bearophileHUGS at lycos.com
Thu Jul 11 10:59:21 PDT 2013
Maxim Fomin:
> My guess is that before 2.063 immutable int y was implicitly
> static, but now it is per instance data which requires context
> pointer which is deduced to be impure - that why compilation
> fails (try placing static attribute). In other words, before
> 2.063 this was a function and now it is a delegate. And
> delegates currently don't play well with constness/immutability.
I think you are right. So is it right to ask D to infer such
delegate as pure?
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list