External Publication
Visit Post

Testing the waters: UMCS (Unified Method Call Syntax)

Rust Internals [Unofficial] February 15, 2026
Source

I'm still fond of this idea. Imho, it does feel a bit weird, but so did postfix .await initially; I think that this style of unified method call syntax would feel similarly natural in retrospect, but will be a difficult sell until people start

kornel:

One thing I'm concerned about: is this currying?

receiver.(function)() should not be currying, exactly because receiver.method() is not curried. The behavior of $place.($fn)($args) is exactly to call ($fn)($place, $args) while applying the same receiver autoref coercions that apply to $place.$method($args). The only difference is that the traditional method syntax looks in the associated method namespace and in the unified method call syntax $fn is an arbitrary expression evaluating to some impl Fn* (eg a function item or closure).

The only involvement of currying is that you can get close to faking the syntax with place.p(func)(args) by currying, but you lose out on mut-generic autoref and two-phase borrows.

Discussion in the ATmosphere

Loading comments...