Transitive const sucks
Christopher Wright
dhasenan at gmail.com
Thu Sep 13 06:18:31 PDT 2007
Walter Bright wrote: well, quite a lot, really.
It seems that you're concentrating heavily on const for objects being
able to ensure thread safety and do a number of other optimizations.
Basically, as far as the owner of a const reference is concerned, the
object and all its methods are 'pure'.
So, since, for all functions that can be optimized similarly and whose
thread safety can be ensured similarly, we will be adding the pure
keyword, why not use the pure keyword here?
Then a const reference to an object could be a weaker contract that
allows everything that people have been wishing the new new const would
allow, if we can find a solution for it that enough people find useable.
(And by 'we' I mean 'you'.)
More information about the Digitalmars-d
mailing list