You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The whole idea seems to be a little bit controversial.
It adds no new value, only syntax sugar. It adds ambiguity which function exactly to call (some free function or a member). it adds ambiguity in combination with binary operators (which operator has bigger precedence).
It would be nice to have some syntax to simplify code patterns like this:
My suggestion is to use some operator, like
|>
for this. Possible syntax:Basically this is just some kind of syntax sugar.
I assume it should work for free function and class functions.
Also it may be helpful to support functions with more than one argument. Possible syntax:
()
may be added for better readability, or they should be obligatory:These two examples are equivalent to:
Such piping operator is binary. It should be decided which priority should it have relative to other binary operators.
The text was updated successfully, but these errors were encountered: