Re: comments on new draft
John Cowan 03 Apr 2016 06:16 UTC
Alex Shinn scripsit:
> In general, I like the new approach. I think it should be
> emphasized that even with index input parameters, the
> procedures always return cursors, and that the use of
> indexes is preserved mostly for existing code and for
> implementor convenience.
Added to the rationale.
> It's not clear if it's allowed to pass just a start parameter
> with no end, which is very convenient (see an example
> below).
It is. SRFI 13 uses [start end] to mean [start [end]], as explained
in the notation section. I thought about changing this, but with up
to five optional parameters it would be very messy.
> Or to trim the leading whitespace without checking the
> result you can use:
>
> (substring/cursors s (string-skip s char-whitespace?))
Adopted.
> Would not string-for-each-cursor be more useful than
> string-for-each-index?
Yes. Not changing that was an oversight. I've changed the example too.
--
John Cowan http://www.ccil.org/~cowan xxxxxx@ccil.org
And through this revolting graveyard of the universe the muffled,
maddening beating of drums, and thin, monotonous whine of blasphemous
flutes from inconceivable, unlighted chambers beyond Time; the
detestable pounding and piping whereunto dance slowly, awkwardly, and
absurdly the gigantic tenebrous ultimate gods --the blind, voiceless,
mindless gargoyles whose soul is Nyarlathotep. (Lovecraft)