On 12-06-07 3:47 PM, Erick Tryzelaar wrote:

Coming from the felix/ocaml world, I'm a big fan of inference :) Any
chance we could infer the return type here, and on normal function
declarations as well?

The return type when used as an expression, maybe. When declared as an item, I'd like to keep the signatures mandatory. That was a very intentional choice. Both for keeping inference function-at-a-time (fewer ways to go wrong, more locality of errors, easier to make parallel) and for keeping the text reasonably explanatory of the types flowing through functions. I believe the whole-program-inference systems go a bit too far, make life too hard for maintenance programmers.

-Graydon
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to