On Fri, Dec 19, 2014 at 1:54 PM, John Cowan <[email protected]> wrote:
>
> Alex Shinn scripsit:
>
> > From the discussions I had seen I thought the general direction
> > for a new string API would be based on string-cursors, which have
> > been implemented and used for some time in multiple Schemes.
>
> I do provide the whole Chibi string-cursor API, I just provide a
> higher level built on it that emulates strings, but with the
> shareability/immutability advantages.
>

The problem is you force a duplication of APIs.  With a string API
you only have one type, and libraries may or may not provide
optional start/end arguments (probably yes when inputs may be
large as in SRFI-115, probably no for things like dealing with file
names).  If you introduce string cursors you can use the same
APIs and either ignore the start/end arguments or convert if
the source and target are using different conventions.  However,
if you introduce a character-span type you either need two versions
of every API or you need to convert from spans to strings, which
is potentially expensive.

> For special optimization cases something like this library may be
> > useful, but I'd like to see it implemented and used for a while before
> > we decide whether it's good for general purpose code, and further
> > whether to standardize it.
>
> Agreed, but SRFIs are not standards.
>

I was +1'ing Per's sentiment that this not be part of a standard.
>From the lists you're sending it to it would seem this is intended for R7RS
large.

-- 
Alex
_______________________________________________
Scheme-reports mailing list
[email protected]
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports

Reply via email to