22 ms·
UFCS is not the feature to call anything like `a.f(b)`, it's to make all functions callable the same way. Calling a method like `A::f(a, b)` is also UFCS and Ru
by 3836293648 3y ago
UFCS is not the feature to call anything like `a.f(b)`, it's to make all functions callable the same way. Calling a method like `A::f(a, b)` is also UFCS and Rust does have that.
- lifthrasiir 3y agoI'm specifically referring to UFCS as in D and Nim (possibly more). Rust's `A::f(a, b)` was also called UFCS in the past, but it is a distinct syntax and the term is no longer used [1]. The UFCS in question would look like `f(a, b)` instead, and conversely, you may be able to call an ordinary function `f` with `a.f(b)` as well. Rust allows neither of them. [1] https://doc.rust-lang.org/reference/expressions/call-expr.html#disambiguating-function-calls https://doc.rust-lang.org/reference/expressions/call-expr.ht...
- WalterBright 3y agoD supports both `f(a,b)` and `a.f(b)`.