Hacker News new | ask | show | jobs
by steveklabnik 2347 days ago
> Actually how about compile type inference not only in function bodies?

This is actually an explicit design decision; it means that the analysis is tractable, and that you don't get spooky-at-a-distance error messages.

2 comments

It's a major detractor, especially for people new to Rust.

The number of times I see people recommend "just cut and paste in whatever type the compiler said it expected ..." just makes my hair curl.

It also tends to make the code more obscure and unreadable, sometimes completely so.

Hmm, I see. It makes sense.