
On Wed, Dec 1, 2021 at 9:09 AM Abdulla Al Kathiri <alkathiri.abdulla@gmail.com> wrote:
How about using the typing return arrow -> to indicate the return of the preceding goes as a first parameter in the function: 1 -> add(2)
That's a possibility. The same arrow then means "this function produces that value" in a definition, and "this value then goes into that function" in an expression.
I don’t like the fact this is used only as a first parameter. What if you want the preceding output to go as a second parameter? Abdulla
Then write it the classic way. The vast majority of the time, you'll want it to be the first parameter. It's like how dot chaining of methods only works for the return value becoming the 'self' parameter - yes, that's incredibly restrictive, but in real world situations, that's easily the most common form needed. Otherwise you end up with a much more complicated proposal with far less beauty to it. ChrisA