|
|
|
|
|
by yazzku
806 days ago
|
|
It's not even factual. > In Rust and Haskell you have to at least annotate the parameter types and return type of functions. Type inference is only for variable bindings inside the function body. This is false for Haskell. Can't speak for Rust. |
|
Even in Rust, I tend to specify types at variable bindings if the type gets overly complex, just to push errors closer to their cause.
A nice feature of Rust is you can specify partial types, wih underscores for the still-to-infer part. E.g. let x:Vec<_>=someexpression; is a vector of something, but you don't know what exactly.