Re: Named procedure; RE: SRFI 197: Threading Macros
hga@xxxxxx 09 Jun 2020 14:15 UTC
> From: Adam Nelson <xxxxxx@nels.onl>
> Date: Tuesday, June 09, 2020 8:48 AM
>
> On 6/9/20 9:40 AM, Arne Babenhauserheide wrote:
>
>> Hi,
>>
>> I like the idea of these pipeline processings a lot, but I expect that
>> the usage of -> as symbol would decrease readability and accessibility
>> of code a lot. Also -> already has meaning within Scheme as conversion
>> between types, e.g. number->string.
>>
>> Could that syntax be optional with a simple named version as base case?
>>
>> This could for example be:
>>
>> pipeline pipeline-last as-pipeline some-pipeline some-pipeline-last
>> cond-pipeline lambda-pipeline.
>
> If it were to use a named version, I'd prefer to keep it short; perhaps
> "pipe" or "seq" instead of "pipeline". I understand the concern about
> the existing meaning of `->`, though. Perhaps `=>` would be better? It
> already has the meaning of "take an implicit argument and pass it to a
> procedure" in `cond`.
Surely we're capable of walking and chewing gum as the same time? I
submit as long as "->" does not have text to on one side or the
other, it won't be confused with the very nice Scheme "from->to"
conversion convention.
I can't see how two names for the same thing wouldn't also "decrease
readability and accessibility of code a lot." Do we do that anywhere
else in Scheme??
As someone who's used Clojure in anger (before returning to Scheme),
there's a great deal of value to using the Clojure syntax as much as
makes sense. Pipelining is also a non-standard method of flow
control, so I prefer it uses a special syntax convention that always
includes non-alpha characters like "->".
BTW, I agree that using "threading" is a bad idea. "Pipelining"
strikes me as the best, it's more unique (sorry) than "sequencing".
- Harold