I really dislike the habit of having separate names for different functions
that abstractly do the same thing - I think it is very user-unfriendly.
If a "span" is a sequence of characters, call it what it is: a string.
For example the "span cursor" API. These appears to be the same as the Kawa
and Chibi 'string-cursor-XXX" functions renamed to "span-cursor-XXX'.
http://www.gnu.org/software/kawa/Strings.html#String-Cursor-API
I am not going to add a whole slew of duplicated function names.
That is just a non-starter. In general, the span-XXX functions need be
renamed to string-XXX. Otherwise, I'm just going to ignore this as
yet another bloated duplication.
One can fix this this by having:
(1) a portable implementation that matches more-or-less the current proposal
(2) a portable library that wraps (1) *and* native strings.
For example:
(import (rename (scheme base) (string? core-string?) ...
(define (string? x) (or (core-string? x) (span? x))
(define (->span x) (if (core-string? x) (make-whole-span? x) x))
(define (string take-right s n)
(span-take-right (->span s) n))
etc
The point is that the span-XXX functions in (1) are private to the implementation;
nobody should be writing programs with them.
Of course an implementation may provide native support for substrings/spans.
--
--Per Bothner
xxxxxx@bothner.com http://per.bothner.com/