Re: First comments Marc Nieper-Wißkirchen 09 Jun 2020 17:44 UTC

Am Di., 9. Juni 2020 um 15:25 Uhr schrieb Adam Nelson <xxxxxx@nels.onl>:

> > (1) In the issue section, you wrote that the name "threading macros"
> > may be a bit misleading, and, in fact, when I read the SRFI's title in
> > Arthur's announcement, I thought it had something to do with threads.
> >
> > What about a name that uses the word "sequencing" like in "sequencing
> > operators" instead?
>
> That's a possibility. I'm also considering "pipeline operators".
>
> > (2) The fact that the macros `->' and `->>' do some automatic wrapping
> > in parentheses leads to some inconsistencies, so I would drop it. At
> > the moment, the macros rely too much on the syntax:
> >
> > (-> x f)
> >
> > result in `(f x)'. If `f' is itself the result of a call to the thunk
> > `g' (or the expansion of a macro named `g'), the user will expect that
> >
> > (-> x (g))
> >
> > does the same. It doesn't, however, because this expands into `(g x)'.
> This is a difficult one to accept, because it takes away from the
> terseness of these macros, which was their original purpose... and it is
> also a significant departure from the original Clojure syntax. I can see
> the point about consistency though, and Scheme in general seems to
> prefer consistency over terseness. I'll consider it.

Thinking about it again, it seems to be enough to disallow the bare
use of an atom in subsequent arguments of the `->' macro. In other
words, all subsequent arguments have to look like function calls (or
macro uses).

It doesn't change much. The baking procedure would be as simple:

(-> bowl
    (add flour)
    (add sugar)
    (add eggs)
    (mix)
    (pour)
    (bake (celsius 450)))