Fully transitive const is not necessary

Lars Ivar Igesund larsivar at igesund.net
Mon Apr 28 11:04:10 PDT 2008


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).

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource, #d.tango & #D: larsivi
Dancing the Tango



More information about the Digitalmars-d mailing list