Email list hosting service & mailing list manager


Re: string-escaper Tsyshevsky Vladimir 26 Nov 1999 09:00 UTC

>From: Donald Welsh <xxxxxx@melbpc.org.au>
     Date: Fri, 26 Nov 1999 03:01:51 +1100

>At 02:28 PM 11/22/99 -0500, xxxxxx@alum.mit.edu wrote:
>>All of these are cases of escaping single characters
>>into multiple characters for the output string.  I think the string
>>library would be more useful with some efficient mechanism for
>>(escaping single characters into multiple characters).
>
>While this could be done with my version of string-filter (in fact, it's
>the sort of thing I had in mind), I'm now tending to the view that this is
>better done by using string ports.  Would anyone care to comment?
>
>Here's my reasoning:  string-filter is like "map", an iterator over a
>collection.  Having a version that allows single -> multiple character
>transforms allows the output string to be an expanded or contracted version
>of its input.
>
>In this case, we want to accumulate the stream of transformed characters
>into an output string.  This is a good use for string-fold with a string port.

I am agree with Donald, the string primitives collection should provide
*effective* character string manipulations. The 'string-escaper'
mentioned is too 'highlevel', it should be really renamed to
'input-port-escaper', since its simplest implementation is
the particular use of more generic stream filtering program.

Regards,

Vladimir V. Tsychevski
senior expert

-----------------------------------------------------
                  Jet Infosystems
Krasnoproletarskaya 6,		Tel. (+7 095) 972-1182
Moscow 103006, Russia		Fax  (+7 095) 972-0791
-----------------------------------------------------
Any opinions or recommendations herein are those of
the author and not of his computer.