Re: [Scheme-reports] Generalization of append, map, and for-each to other sequences John Cowan (03 Jul 2012 03:10 UTC)

Re: [Scheme-reports] Generalization of append, map, and for-each to other sequences John Cowan 03 Jul 2012 03:09 UTC

Marc Feeley scripsit:

> There is another perfectly valid consistency argument which is to
> only have the map and for-each operations on lists only.

Since (with the exception of rest arguments) lists are not a necessary
Scheme data type, one might equally well claim that it was consistent
to have them on vectors only.

> not consistent is to have such conversion procedures for more than
> one type of sequence, but not all types of sequences.

The issue is what a bytevector really is.  Is it a blob object that can be
parsed in a variety of ways, or it is a sequence of bytes?  The WG didn't
get agreement on that, though we did agree on the name "bytevector".
If it's a sequence of bytes and nothing more, then it makes sense to treat
it just like all other sequence types.  If it is a blob, it's not so clear.

The current compromise is to provide only minimal support (which has grown
somewhat from the absolute minimum) in the small language, with comprehensive
support in the large language.

>   vector-append

Ballot ticket #444 was already filed.

>   bytevector-append
>
> Aside from the consistency argument, these procedures are very useful
> for divide-and-conquer algorithms on vectors and bytevectors.

That's a plausible argument, so ballot ticket #451 filed.

--
Values of beeta will give rise to dom!          John Cowan
(5th/6th edition 'mv' said this if you tried    http://www.ccil.org/~cowan
to rename '.' or '..' entries; see              cowan@ccil.org
http://cm.bell-labs.com/cm/cs/who/dmr/odd.html)

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports