Fully transitive const is not necessary

Walter Bright newshound1 at digitalmars.com
Sun Apr 27 11:18:42 PDT 2008


Sean Kelly wrote:
> So this is predicated on the idea that the optimal strategy is to assume 
> that library functions will not actually need to make any changes the 
> majority of the time, and that they do COW internally.  Fair enough.  I 
> agree that this makes it a clear win for Phobos, which is designed 
> around this assumption.

It turns out to be a very natural way of writing string code. And yes, I 
was surprised to discover that in-place string modification turned out 
to be rare. Most operations are slicing/concatenating, which work just 
fine on invariant strings.



More information about the Digitalmars-d mailing list