New answers tagged

11 votes

Should rust anonymous functions fully specify parameter types?

If Rust's type inference can infer argument types using external information, it is OK to omit them There is a precedent for Haskell allowing this. But note that Rust's type inference is a lot weaker ...
  • 66.1k
4 votes

Should rust anonymous functions fully specify parameter types?

Implicit parameter types should be allowed We write code to be used. If the compiler can implicitly infer the types by calling the function the exact same way you would with explicit parameter types, ...

Top 50 recent answers are included