Fully transitive const is not necessary

Bill Baxter dnewsgroup at billbaxter.com
Mon Apr 28 14:26:05 PDT 2008


Lars Ivar Igesund wrote:
> Bill Baxter wrote:
> 
>> Lars Ivar Igesund wrote:
>>> Sascha Katzner wrote:
>>>
>>>> Walter Bright wrote:
>>>>> Most operations are slicing/concatenating, which work just fine on
>>>>> invariant strings.
>>>> Correct me if I'm wrong, but if you want to concatenate two invariant
>>>> strings, you have to allocate a new buffer. Isn't that a possible speed
>>>> penalty compared to regular strings?
>>> Indeed it is, and this is the main reason for Tango being so damn fast at
>>> text processing.
>> But note that Tango also is suffering from bugs now that are due to that
>> design choice (i.e. the choice to require pre-allocation for almost all
>> text processing functions).
> 
> Only one of those are related to the above, the second is a different issue
> (about specification).
> 

Ah. Ok.

-bb



More information about the Digitalmars-d mailing list