groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Bayer <andrew.ba...@gmail.com>
Subject Re: [GEP] Concatenative Method Calls
Date Sun, 25 Feb 2018 14:02:05 GMT
I actually find that less readable, and feel like it would get even worse
with multiple parameters. I’m not sure I see what the value here would be.

A.

On Sun, Feb 25, 2018 at 8:39 AM Daniel.Sun <sunlan@apache.org> wrote:

> Hi all,
>
>      I propose to introduce Concatenative Method Calls to Groovy. It can
> make code more readable, for example:
>
> Currently we write method calls like:
> y = foo(x)
> z = bar(y)
> w = baz(z)
> OR
> w = baz(bar(foo(x)))
>
> Concatenative Method Calls(inspired by [1]):
> w = x => foo => bar => baz
>
>       Any thoughts?
>
> Cheers,
> Daniel.Sun
> [1] https://en.m.wikipedia.org/wiki/Concatenative_programming_language
>
>
>
> --
> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
>

Mime
View raw message