Email list hosting service & mailing list manager

SRFI 130 - n+2 cursors Per Bothner (03 Dec 2015 19:06 UTC)
Re: SRFI 130 - n+2 cursors John Cowan (03 Dec 2015 20:56 UTC)
Re: SRFI 130 - n+2 cursors Alex Shinn (04 Dec 2015 04:12 UTC)

SRFI 130 - n+2 cursors Per Bothner 03 Dec 2015 19:03 UTC

"Given a span of length n, there are n+2 possible cursors that refer to it: one for each
character in the span, one for the position just before the first character (known as the
"pre-start cursor"), and one for the position just after the last character (known as the "post-end cursor")."

I'd like to see some better justification for this unusual choice.
Why not the more traditional n+1 possible cursors?  That would be more compatible
with existing practice, in Scheme, Lisp, Emacs, Java ...

The cursor API seems written in terms of n+1 positions: span-cursor-start
"Returns a cursor referring to the first character in span" - not the pre-start cursor.

(IIRC SQL cursors have n+2 positions, but that's an outlier.)
--
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/