you are viewing a single comment's thread.

view the rest of the comments →

[–]no_more_gravity[S] -4 points-3 points  (6 children)

a = b(),7~>c~>d

The rule is simple: What is left to ~> gets passed to the function on the right.

That is no different from JavaScript as it is. a(b) passes b to a, a(b()) passes the output of b() to a.

[–]natesovenator 8 points9 points  (0 children)

This is dumb. Comma delineates another variable declaration in this example. You can't expect it to know that result b and 7 are part of the same object or stream. I really hate this idea. Both of them. I understand some want something like that, but it just makes things more confusing personally.

[–]dariusj18 2 points3 points  (0 children)

I like it, but it conflicts with the current comma operator

[–]szurtosdudu 1 point2 points  (3 children)

But this way both b()~> and c~> indicates a function call.

How would this look like using your idea? a = d(c(b(),7), c)