[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] Generalization of append, map, and for-each to other sequences



>> My initial reaction is "a foolish consistency is the
>> hobgoblin of little minds" as has been quoted perhaps
>> too often on this list by now.  I don't like the
>> combinatorial explosion in procedures for every new
>> type added, and note that a general loop construct
>> (as will be in the large language) extends more
>> naturally, is often easier to read, and is almost
>> universally more efficient since I'm unaware of an
>> implementation which inlines *-map.
>
> There is another perfectly valid consistency argument which
> is to only have the map and for-each operations on lists only.
> What is not consistent is to have such conversion procedures
> for more than one type of sequence, but not all types of
> sequences.  I personnaly favor removing them from R7RS
> (because they bloat the small language needlessly), but I'm
> not strongly against them either because I can understand
> the other consistency point of view.
>
> By the way, I find it much more important to have the following
> procedures, which complement append and string-append,
> which are not in R7RS:
>
>   vector-append
>   bytevector-append
>
> Aside from the consistency argument, these procedures are
> very useful for divide-and-conquer algorithms on vectors and
> bytevectors.

Marc made several arguments in favor of consistency. I agree with him.
Needless inconsistency makes a language more difficult to learn. Given
that arguments for and against should consider the future--not just
the past.

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