Email list hosting service & mailing list manager

SRFI 130 - "span" prefix Per Bothner (04 Dec 2015 03:34 UTC)
Re: SRFI 130 - "span" prefix John Cowan (04 Dec 2015 15:54 UTC)
Re: SRFI 130 - "span" prefix Per Bothner (04 Dec 2015 16:10 UTC)
Re: SRFI 130 - "span" prefix taylanbayirli@xxxxxx (04 Dec 2015 16:49 UTC)
Re: SRFI 130 - "span" prefix John Cowan (05 Dec 2015 07:05 UTC)
Re: SRFI 130 - "span" prefix John Cowan (06 Dec 2015 06:44 UTC)
Re: SRFI 130 - "span" prefix Shiro Kawai (04 Dec 2015 18:49 UTC)
Re: SRFI 130 - "span" prefix John Cowan (05 Dec 2015 07:06 UTC)
Re: SRFI 130 - "span" prefix Shiro Kawai (05 Dec 2015 07:21 UTC)
Re: SRFI 130 - "span" prefix John Cowan (05 Dec 2015 16:51 UTC)
Re: SRFI 130 - "span" prefix Per Bothner (05 Dec 2015 17:20 UTC)
Re: SRFI 130 - "span" prefix Shiro Kawai (05 Dec 2015 17:39 UTC)
Re: SRFI 130 - "span" prefix John Cowan (05 Dec 2015 20:00 UTC)
Re: SRFI 130 - "span" prefix Alex Shinn (04 Dec 2015 16:52 UTC)
Re: SRFI 130 - "span" prefix Shiro Kawai (04 Dec 2015 20:27 UTC)
Re: SRFI 130 - "span" prefix John Cowan (07 Dec 2015 00:02 UTC)
Re: SRFI 130 - "span" prefix Shiro Kawai (07 Dec 2015 07:57 UTC)
Re: SRFI 130 - "span" prefix John Cowan (07 Dec 2015 13:09 UTC)
Re: SRFI 130 - "span" prefix John Cowan (06 Dec 2015 02:32 UTC)
Re: SRFI 130 - "span" prefix Alex Shinn (07 Dec 2015 19:26 UTC)
Re: SRFI 130 - "span" prefix John Cowan (07 Dec 2015 19:48 UTC)
Re: SRFI 130 - "span" prefix Shiro Kawai (07 Dec 2015 20:08 UTC)
Re: SRFI 130 - "span" prefix John Cowan (07 Dec 2015 20:25 UTC)
Re: SRFI 130 - "span" prefix Shiro Kawai (07 Dec 2015 20:44 UTC)

Re: SRFI 130 - "span" prefix John Cowan 06 Dec 2015 02:32 UTC

Alex Shinn scripsit:

> 1. provide a cursor-oriented API for strings (to account for non-O(1)
> indexing)
> 2. provide a cheap substring API (to remove the optional start/end-arg API
> hell)

Correct, at the expense of string mutation, which seems to be little used
(there are only about five references to it in the Chicken source, excluding
of course the implementation of string-set!, string-fill!, and of SRFI 13).

> Given 1, you could be more aggressive with 2 by providing e.g. ropes,
> though this increases implementation complexity, makes FFIs more
> difficult (e.g. it's easier to pass a span to PCRE than a rope), and
> introduces the possibility that a given substring operation isn't actually
> cheap (if you need to copy many links in the rope).

This SRFI doesn't exclude those, but of course cursors would have to be
more complicated.

> So I think starting with spans and letting implementations experiment
> I agree the name is confusing,

What would you suggest?  I'd be fine with "istring", though it perhaps
put the emphasis on what is lost rather than what is gained.

--
John Cowan          http://www.ccil.org/~cowan        xxxxxx@ccil.org
Normally I can handle panic attacks on my own; but panic is, at the moment,
a way of life.                 --Joseph Zitt