Re: use of vector-map is not srfi-43 compatible?
Wolfgang Corcoran-Mathe 08 Aug 2020 19:21 UTC
On 2020-08-08 20:34 +0200, Marc Nieper-Wißkirchen wrote:
> The root of the problem does not lie in SRFI 133. Already in
> R7RS-small, the procedure "vector-map" is incompatible to SRFI 43.
Of course, I was mistaken. SRFI 133 just made 43 consistent with R7.
> The SRFI 43 procedure is certainly much more useful than the R7RS/SRFI
> 133 procedure. On the other hand, the R7RS/SRFI 133 procedure does
> seem to follow the general shape of the XXX-map procedures where XXX
> is some type of collection (object).
Indeed, SRFI 43 vector-map, with its two-argument mapped procedure, is
indeed an odd case among the many "map" functions of Scheme. While
having access to the index is useful, the R7/SRFI 133 versions are
more consistent.
> In any case, the name "vector" for the Scheme data structure is not a
> very good one (but we cannot change this anymore) because it does not
> have to have anything to do with vectors in a typical mathematical
> vector space.
Exactly.
--
Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz>
"A LISP programmer knows the value of everything, but the cost
of nothing." --Alan J. Perlis