Hmm, certainly iterating -next/prev works (and in naive multibyte strings
you have to do it anyway---but implementation may choose better string
representation), but I concern the overhead of range check per iteration.


On Tue, Apr 12, 2016 at 8:28 PM, John Cowan <xxxxxx@mercury.ccil.org> wrote:
Shiro Kawai scripsit:

> It occurred to me that it might be useful that
> string-cursor-{forward|back} returns #f (or any other value that is
> invalid for cursors and indexes), instead of making it an error.

On reflection, I think -forward and -back should just be removed.
They are trivial iterations of -next and -prev, they don't exist in
Chibi at present, and they have the problem you mention.  Unless someone
objects, I will remove them before finalization.

> Additionally, I noticed that there's no mention that #f can't be a valid
> cursor value in the current draft.  Cursors should be disjoint to #f,
> for string-contains requires so.

I've added this to the next draft.

--
John Cowan          http://www.ccil.org/~cowan        xxxxxx@ccil.org
The first thing you learn in a lawin' family is that there ain't
no definite answers to anything.  --Calpurnia in To Kill A Mockingbird