Re: SRFI 210 comments Marc Nieper-Wißkirchen 14 Sep 2020 17:40 UTC

Am Mo., 14. Sept. 2020 um 18:55 Uhr schrieb Wolfgang Corcoran-Mathe

> Thanks for this clear, useful, and exceptionally detailed SRFI.  I

Thanks for the compliment and even more for your comments.

> (1) Is there a better name for with-values?  By unofficial convention,
> Scheme procedures whose names begin with `with-' establish some
> dynamic state for a procedure call.  with-values does not.  The range
> of available names here is unfortunately rather limited.  I thought
> `consume' was somewhat descriptive of what with-values does, but there
> may be better names.

The name `with-values` is from a paper by Ashley and Dybvig
where they argue that this syntactic mirror or the procedural
call-with-values should have been standardized instead.

Note that `with-values` is not a procedure so the "unofficial
convention" you refer to may not apply. There are existing examples of
syntax like "with-syntax" (R6RS) or "with-ellipsis" (Guile and now
SRFI 211) that do not call a procedure or establish some dynamic

`with-values` is just a variation of `apply/mv` (switched arguments)
added because of its parallelity to `call-with-values` and to
implement the proposed syntax of the Ashley/Dybvig paper. Calling it
"consume" (otherwise a fine name!) contradicts this idea.

> (2) For the specification of case-receive, I think we should have
> "(case-receive <producer> <clause> ...)" instead of "(case-receive
> <producer> (clause ...))", unless I've misunderstood something.
> The example implementation of case-receive is also missing some
> close-parens.

Thanks for catching this. Indeed, angle brackets are missing around
"clause" and there is an extraneous set of parentheses.

> (3) list-values: For "Is is an error ...", read "It is an error ...".

Thanks, will correct it.

> (4) Several specifications require that an argument be a box, and
> box-values refers to unbox.  I suggest including a pointer to SRFI
> 111/(scheme box) to clarify these references.

SRFI 195 (a conservative extension of SRFI 111) is mentioned the first
time a box appears (in box/mv). Nevertheless, you make a point and I
will add a general remark at the top that by "box" I mean a SRFI
111/195 box.

> (5) The description of compose is odd: "When the resulting procedure
> is applied to arguments, these arguments are applied to transducer1,
> whose results are applied to transducer2, and so on..."  The phrase
> "applied to" here seems to have its arguments flipped; usually
> procedures are "applied to" arguments.  Similar unusual wording occurs
> in the specs of bind/list, bind/box, and bind.

Yes, the objects are reversed here. The correct term is "are passed
to". Thanks for noting this!

> (6) bind/list, bind/box, bind: For "... and the transducers are no
> procedures", read "... and the transducers are not procedures".


> I've run some preliminary experiments with the sample implementations
> and haven't yet found any errors, aside from the typos in case-receive
> noted above.  I've collated a single source file from the SRFI's code;
> would you have any interest in adding it to the SRFI repository?

There is a single source file in the repo Did
you miss it or am I missing something?

So long,