Re:From Stacks to Trees: A new aliasing model for Rust
by MereInterest on Monday June 12, 2023 @06:07AM
(#36291013)
It does, but Rust also has separate namespaces for methods and variables. That is, a.foo(b) will always be a method foo and never a field foo, because the syntax is that of a method. In order to access a function object, then call it, you would use (a.foo)(b). The parentheses cause the contents to be parsed as a variable expression.
[ Parent
| on HN ]
There are no comments on this comment yet.