SRFI 43 vs. R7RS-small: poll results John Cowan (07 Dec 2015 19:38 UTC)
|
Re: SRFI 43 vs. R7RS-small: poll results
Arthur A. Gleckler
(07 Dec 2015 22:13 UTC)
|
Re: SRFI 43 vs. R7RS-small: poll results
John Cowan
(07 Dec 2015 23:12 UTC)
|
SRFI 43 vs. R7RS-small: poll results John Cowan 07 Dec 2015 19:38 UTC
In preparation for writing SRFI 133, a proposed replacement for SRFI 43 and possible component of R7RS-large, I'm publishing a summary and the results of the poll I ran on this mailing list. The issue I was asking about was the conflict between SRFI 43 and R7RS-small versions of vector-map and vector-for-each. The The SRFI 43 versions pass the index of the current vector elements as well as the elements themselves to their procedure arguments, whereas the R7RS-small versions pass only the elements. These are called "index form" and "non-index form" below. I proposed four options: 1) Live with the conflict, using the library system to resolve which version of these procedures you want. 2) Write a new SRFI in which vector-map and vector-for-each are renamed to vector-map/index and vector-for-each/index. This resolves the conflict but is inconsistent with the other procedures of SRFI 43 that are in index form. 3) Write a new SRFI in which all the vector-* procedures that pass an index, namely -fold -fold-right -map -map! -for-each, are split into two procedures, an index form ending in "/index" and a non-index form with no suffix. 4) Introduce a mechanism into Scheme to allow vector-map and vector-for-each to determine if their procedure arguments expect to be called in index form or not. Shiro Kawa and Alex Shinn separately proposed: 5) Write a new SRFI in which the five procedures listed under 3 are provided in non-index form in addition to vector-fold (but nothing else) in index form under a new name. (Alex proposed to call it vector-tabulate, but SRFI 1 tabulate is a constructor, not a fold.) Votes: Sven Hartrumpf preferred 3. Shiro Kawa preferred 5. Taylor Campbell preferred 1 to 3 to 2. Art Gleckler preferred 2 to 1 to 3 to 4. Sudarshan Chawathe preferred 2 to 3 to 1 to 4. Alex Shinn preferred 5 to 3 to 1. Faré preferred 3 to 2. -- John Cowan http://www.ccil.org/~cowan xxxxxx@ccil.org Kill Gorgun! Kill orc-folk! No other words please Wild Men. Drive away bad air and darkness with bright iron! --Ghan-buri-Ghan