Email list hosting service & mailing list manager

SRFI 130: 120 days Arthur A. Gleckler (01 Apr 2016 19:25 UTC)
Re: SRFI 130: 120 days John Cowan (01 Apr 2016 20:40 UTC)
Re: SRFI 130: 120 days Alex Shinn (02 Apr 2016 14:32 UTC)
Re: SRFI 130: 120 days John Cowan (02 Apr 2016 16:29 UTC)
index/cursor merging [was: 120 days] Per Bothner (03 Apr 2016 19:16 UTC)
Re: index/cursor merging [was: 120 days] John Cowan (03 Apr 2016 19:40 UTC)
Re: index/cursor merging [was: 120 days] Alex Shinn (04 Apr 2016 01:18 UTC)
Re: index/cursor merging [was: 120 days] Per Bothner (04 Apr 2016 02:56 UTC)
Re: index/cursor merging [was: 120 days] Alex Shinn (04 Apr 2016 05:39 UTC)

Re: index/cursor merging [was: 120 days] John Cowan 03 Apr 2016 19:40 UTC

Per Bothner scripsit:

> I feel very uncomfortable with this approach.  It seems very error-prone.

If it troubles you, you can subtract 1 from all cursors so that they
never overlap with indexes.

> It feels inconsistent: Some procedures have "cursor" in the same,
> while some don't.  Why string-ref/cursor rather than just string-ref,
> but string-pad rather than string-pad/cursor?

The ones with "/cursor(s)" are the ones that are present without cursor
support in the R7RS base library.  It's certainly fine to make the
R7RS names accept cursors too, but it can't be retroactively imposed.

> It precludes an extension where negative indexes count from the end,
> as in Python.

True.

> You [John] have said before that the Scheme way is to not overload
> procedures to support different types, even when the types are different
> implementations of the same concept (such as sequences), but rather
> to have different procedures.

Indeed.  But duplicating everything for indexes and cursors, as draft #2
did, is just too agonizingly painful even for me.

--
John Cowan          http://www.ccil.org/~cowan        xxxxxx@ccil.org
        "You need a change: try Canada"  "You need a change: try China"
                --fortune cookies opened by a couple that I know