On 13/05/2012 17:41, Alex Rønne Petersen wrote:
<snip>
I agree with everything but toString(). I'm afraid that forcing toString() to 
be const
will have harm flexibility severely. Can't we do better, somehow?

How exactly?

If you're talking about memoization, it ought to be possible to make use of std.functional.memoize to implement it.

Otherwise, using toString to change the state of an object is bending semantics. If you want a method to generate a string representation of an object in a way that might do this, then create your own method to do it.

Stewart.

Reply via email to