2 ms·
I've no idea what you're trying to say, but as far as I can interpret it when it comes to Rust you got things exactly backwards: foo().bar().baz() if ever
by masklinn 5y ago
I've no idea what you're trying to say, but as far as I can interpret it when it comes to Rust you got things exactly backwards:
foo().bar().baz()
if everything is monomorphic, there is no requirement that the result of bar() be a member of a direct dependency, to say nothing of being imported into the local scope.
If `baz()` is a member of a trait, however, that trait must be in-scope.
- dwohnitmok 5y agoI'm talking about a hypothetical other language without ad-hoc polymorphism (in the spirit of the original article comparing Rust against other languages such as e.g. Go) and also in this case without methods. One poster child for this kind of programming is Elm (there are several other even more niche languages that do this as well).