External Publication
Visit Post

Testing the waters: UMCS (Unified Method Call Syntax)

Rust Internals [Unofficial] February 15, 2026
Source

I think I prefer x.(foo, param1, param2, param3) for foo(x, param1, param2, param3). One advantage is that it resolves the issue of what to do with an unapplied function - it doesn't look like currying:

kornel:

One thing I'm concerned about: is this currying? Can x.(foo) exist as a value, rather than just being part of a method call syntax? If so, what type does it have, with what lifetimes? Rust currently has a magic for two-phase borrows where x.foo(x.bar) is special. I'm afraid that currying wouldn't support that (at least not without new magic in the borrow checker and the type system), so changing x.foo(x.bar) to x.(foo)(x.bar) would fix one thing and break another.

Another advantage is that it has less parenthesis.

In any case I just hope Rust gets something like it!

Discussion in the ATmosphere

Loading comments...