3 ms·
I always wonder why inference a la Hindley-Milner isn't what people push as the best of both worlds.
by jghn 3y ago
I always wonder why inference a la Hindley-Milner isn't what people push as the best of both worlds.
- alwaysbeconsing 3y agoInference 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.
- jghn 3y agoIt'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.