This page is part of the web mail archives of SRFI 43 from before July 7th, 2015. The new archives for SRFI 43 contain all messages, not just those from before July 7th, 2015.
On Wednesday, April 9, 2003, at 04:07 AM, Michael Burschik wrote:
Section 4.3 defines the function vector-split-at. The example, however, usesthe name vector-split. This error does not occur in the reference implementation, by the way.
Given the rather lucid name vector-split-at /index/, wouldn't vector-split-on /predicate/ be better than vector-break (even if thisfollows the traditions established in SRFI-1)? And is it really necessary to define both vector-span and vector-break, which differ only in negating thepredicate? The same applies to vector-index and vector-skip.
I like the idea of VECTOR-SPLIT-ON instead of VECTOR-SPAN. Indeed, VECTOR-SPAN is -very- non-intuitive. Should only a couple more people agree with us, then
I'll change VECTOR-SPAN to VECTOR-SPLIT-ON.About VECTOR-BREAK, I'll wait to see what more people have to say about it. I
personally don't care either way.
I also noticed that several functions are available in two very similarversions: one that takes a single vector and optional start/end arguments, and one that takes several vector arguments. A single, more general function might be more desirable, although there would be some overhead dealing withkeywords or argument types.
I noticed this, too, and couldn't really decide which should take ranges and which should take any number of vectors. I considered using what Sunterlib's collection library used, which was to have a 'VECTOR-FOO,' which took a vector, some other arguments, and a range; and a 'VECTORS-FOO,' which took any number of vectors and whatever other arguments. This seemed a little excessive, though, so I didn't do it, but if there is a general consensus that people would like to
do things that way, I'd be happy to include them.
The function vector-map/index requires a procedure that takes an index and some number of vectors as arguments. However, the required index argument is passed as the last instead of the first argument. I find this non-intuitive,and someone might want to define a procedure that takes an index and a _variable_ number of vectors as arguments.
I agree that this is a little non-intuitive. I made the index be the last argument merely because SRFIs 1 and 13 had their LIST/STRING-FOLD and such functions take the KNIL argument last (and if there are several people who would like me to change that, too, I'd be happy to), so I made the index argument be
Regards Michael Burschik