SRFI 134 Draft 7 (of 2016-04-12) comments
Sudarshan S Chawathe
(09 May 2016 20:18 UTC)
|
Re: SRFI 134 Draft 7 (of 2016-04-12) comments John Cowan (10 May 2016 02:47 UTC)
|
Re: SRFI 134 Draft 7 (of 2016-04-12) comments John Cowan 10 May 2016 02:47 UTC
Sudarshan S Chawathe scripsit: > * (minor) ideque constructor: unnecessary '[ ... ]' metasyntax > (given usual interpretation of '...')? Removed. > * (minor) ideque-add-front: Is it significant that the bound > specifically mention amortized here (given that the introduction > notes that as an option for all bounds) but not elsewhere? No significance; removed. > * ideque-ref and other accessors: Is the index 'n' 0-based as it is > for list-ref? If so, the error conditions should read "n is not > less than" instead of "n is greater than" (or some such change). Fixed. > * ideque-count: There seems to be some copy/paste error in the > description. (One sentence seems pasted in the middle of > another.) Fixed. > * For the bounds in the Mapping section, is 'n' interpreted as the > number of elements in the ideque argument, or something else > ("number of elements involved")? In particular, for > ideque-append-map, if n is the number of elements in the ideque > argument, the bound seems problematic to me. Added "where n is the number of elements in all the lists returned." > * I noticed from some earlier messages that, in an earlier draft of > the SRFI, procedures in the Mapping section (ideque-map, etc.) > accepted multiple ideques but are now limited to single ideques. > I'm not sure of the motivation for the change. It would be nice > to allow multiple ideques, by analogy with SRFI 1 but perhaps > there are some implementation issues that are more compelling > here. I'm not sure and would be glad for any clarifications. Doing so would make them painfully less efficient. The sample SRFI 1 implementation accepts this cost and has two implementations under the covers for these routines, one for a single list and one for multiple lists. I decided to keep just ideque-zip, which merges multiple ideques into a single ideque at the expense of allocating more pairs. -- John Cowan http://www.ccil.org/~cowan xxxxxx@ccil.org People go through the bother of Christmas because Christmas helps them to understand why they go through the bother of living out their lives the rest of the year. For one brief instant, we see human society as it should and could be, a world in which business has become the exchanging of presents and in which nothing is important except the happiness and well-being of the ultimate consumer. --Northrop Frye (1948)