[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: null terminated strings

From: Tom Lord
Subject: Re: null terminated strings
Date: Fri, 16 Jan 2004 13:06:09 -0800 (PST)

    > From: address@hidden (Paul Jarc)

    > FWIW, I think that (preferably copy-on-write) shared substrings are
    > valuable enough for performance 

mutation-effects-both shared substrings are valuable as a feature of
(extended) Scheme.

A common idiom in string-manipulating programs is to manipulate and
pass around triples (STRING START END).

It's well worthwhile to make such triples a first-class type -- the
alternative is to have to write lots of string manipulation functions
in a style where they take three actual parameters (ideally with two
of those being optional) to represent a single conceptual parameter.

And if you have that abstract data type, since it is compatible with
the RnRS requirements for the STRING? type, it may as well be a subset
of the STRING? type.

copy-on-write shared substrings are a performance feature --
mutation-effects-both shared substrings are an improvement to Scheme.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]