4 ms·
Is it really that hard to parse generics without a 'turbofish'? Coming from Scala and Haskell something like: Into::<String>::into() Just really irks me. It i
by maxroverts 6y ago
Is it really that hard to parse generics without a 'turbofish'? Coming from Scala and Haskell something like:
Into::<String>::into()
Just really irks me. It is much less elegant than I am used to. Do experienced Rust developers actually like the style, or is it just complex to parse?
- mickallen 6y agoI personally have no issue with it. Because Rust's type inference is so good, you don't generally even have to specify generic type parameters for method calls. It is more verbose and perhaps you could say less elegant, but I think it better expresses the concept.
- steveklabnik 6y agoYou need it very rarely, so it’s just really a non-issue. Like, you don’t even have to use it in many cases where you could. For example, this case doesn’t have to use the turbo fish. I don’t think the turbo fish is particularly good looking, but it is better than the alternatives, and something I rarely even need to see, let alone write.