Re: New draft (#5) and extended last call for comments on SRFI 232: An advanced currying form
Marc Nieper-WiÃkirchen 31 Mar 2022 17:11 UTC
Am Do., 31. März 2022 um 18:36 Uhr schrieb Wolfgang Corcoran-Mathe
<xxxxxx@sigwinch.xyz>:
>
> On 2022-03-29 17:39 +0200, Marc Nieper-Wißkirchen wrote:
> > (1) The title of the SRFI is not really a faithful description of the
> > contents because there is not really a "currying" operator. I wonder
> > whether it makes sense to rename it to "Curried Procedures"?
>
> I'm not sure. "Curried Procedures" is more accurate, but it might
> suggest something like SRFI 219. One of the intriguing things about
> SRFI 232 is that the procedures created by 'curried' can be applied
> to arguments partially or all at once--thus they aren't strictly
> curried procedures. Perhaps "flexible curried procedures" is a
> more descriptive title? I don't want to change the title at the
> last minute unless the new title is significantly clearer.
Hopefully, you will get some input on this from other people as well.
> > (2) In the specification, you can cut away one more case, namely the
> > third one by explicitly allowing n = 0 in the second case. I would
> > leave the third case as a comment but not as part of the actual
> > specification because that way the uniformity is even clearer.
>
> In other words, treat
>
> (curried xs ...)
>
> as a special case of
>
> (curried (v1 ... vn . xs) ...),
>
> which it sort of is.
>
> While this would be elegant, I don't think it would be very clear.
> Both R6RS and R7RS deal with these cases of lambda separately, and
Personally, I think it would have been nicer if the third case would
have been a comment in the reports.
> I'm inclined to do the same. (Further, do many Scheme implementations
> still follow the convention that "every atom is an improper list",
> and allow (. x) to be equivalent to x?)
Syntax-rules follow this convention. But it is not the convention
that (. x) is x but that
(a ... . x) with a being a pattern variable (whether a syntax-rules
one or a meta pattern variable) of depth 1 that has length 0.