4 ms·
Rust uses Hindley-Milner to infer types in general, but there is a conscious decision to require explicit types in function signatures etc. Also, lifetimes are
by ehsanu1 8y ago
Rust uses Hindley-Milner to infer types in general, but there is a conscious decision to require explicit types in function signatures etc. Also, lifetimes are part of all rust's types, they are just usually elided since it would be pretty verbose and unhelpful to always write them out.
- tom_mellior 8y ago> Rust uses Hindley-Milner to infer types in general True, I had forgotten that you can just write let foo = bar. (Not a regular Rust user.)