>
>
> One thought, it might be nice to have something a little more automatic. 
> Specifically, I was thinking if there was an 'ImmutableString' class, you 
> would always know that you should make a view rather than a copy. It would 
> also be in keeping with the general design where specifying a type allows 
> the compiler to do nice optimizations.
>
 
I guess that won't be the case to keep types stable. A slice of 
ImmutableString should remain an ImmutableString.

However, SubString (and SubArray) could be changed so that the indices are 
made optional. You could write
s = SubString(randstring(size))
and handle it with views.

Reply via email to