New draft (#2) of SRFI 197: Expression Chaining Operators Arthur A. Gleckler (11 Jun 2020 05:43 UTC)
Re: New draft (#2) of SRFI 197: Expression Chaining Operators Marc Nieper-Wißkirchen (11 Jun 2020 09:57 UTC)
Re: New draft (#2) of SRFI 197: Expression Chaining Operators Marc Nieper-Wißkirchen (12 Jun 2020 08:29 UTC)
Re: New draft (#2) of SRFI 197: Expression Chaining Operators Arne Babenhauserheide (12 Jun 2020 12:28 UTC)
Re: New draft (#2) of SRFI 197: Expression Chaining Operators Marc Nieper-Wißkirchen (15 Jun 2020 09:47 UTC)
Re: New draft (#2) of SRFI 197: Expression Chaining Operators Marc Nieper-Wißkirchen (15 Jun 2020 10:56 UTC)
Re: New draft (#2) of SRFI 197: Expression Chaining Operators Marc Nieper-Wißkirchen (17 Jun 2020 07:53 UTC)
Re: New draft (#2) of SRFI 197: Expression Chaining Operators Arne Babenhauserheide (18 Jun 2020 14:04 UTC)

Re: New draft (#2) of SRFI 197: Expression Chaining Operators Arne Babenhauserheide 18 Jun 2020 14:03 UTC

Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> writes:

> "Procedure Call Chaining Operators" is a decent name, although it's
>> getting even more verbose. I think "Expression Chaining Operators" is
>> clear enough.
>>
>
> Change it "Application Chaining (Operators)". That is brief, describes
> exactly what this SRFI is about, and doesn't lie like "Expression Chaining".

This has the alternate meaning of chaining not application of procedures
but applications (which was my first thought when reading the name).

(naming is hard …)

>> case. Pipeline operators are a common feature in functional languages,
>> but I'm not aware of any language that has a special case to handle
>> pipeline calls that return void. A pipeline with a void return value in
>> it is not a pipeline, it's just a `begin`. This is outside the scope of
>> this SRFI.
>>
>
> The reason "outside of the scope of this SRFI" is a knockout argument.

It is, but that does not mean that it’s invalid. Scope creep can break a
system.

But from experience with Java streams, I assume that there will be
use-cases for chains that terminate with a call without defined return
value.

(chain +
       (<> 5 3)
       (* 8)
       (format #t "~a\n"))

There is one other use-case that springs from this:
(chain +
       (<> 5 3)
       (* 8)
       (display) ;; undefined return value
       (newline)) ;; if it receives an argument, that’s the port!

But there’s a simple replacement:
(chain +
       (<> 5 3)
       (* 8)
       (display))
(newline)

Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken