@JustAPerson
Am I wrong that this pipeforward operator could subsume both the functionality of (untyped) postfix macros and the unified method call syntax? This seems like a powerful, orthogonal feature. I strongly prefer to changing method resolution
Yes, exactly!
I’d prefer -> to |> because it’s easier to type, but it might confuse C/C++ programmers. Perhaps .>, easy to type, still looks like a method, and has a visual cue of forwarding the lhs.
I don’t like “->” because that symbol has a completely unrelated use in function signatures.
@skysch
How would this be expected to handle evaluation order?
I think it would probably be best to desugar to something equivalent to:
let __temp__ = a;
f(__temp__, b, c)
so that it avoid weirdness with unspecified behavior for evaluation of arguments (if that is still unspecified, I don’t know if it is), and prevents “garden path sentences” with macros.
My general opinion on the whole matter is that I’d rather have a real currying mechanism instead, but to be honest, I haven’t thought it through much.
that wouldn’t work for macros