Hacker News new | ask | show | jobs
by jghn 1065 days ago
I always wonder why inference a la Hindley-Milner isn't what people push as the best of both worlds.
1 comments

Inference for static types requires more from the compiler in two key ways that impact the developer experience. First, it's just plain more work to do when compiling, so compile times are longer than they might otherwise be. Second, error handling and messaging needs to be written very carefully to avoid dense and unhelpful output when inference fails. It's positive in many ways, but it's not a free lunch.
It's not a free lunch. But it's better than in projects where I'm forced to supply a type annotation everywhere in a dynamic language.