2 ms·
Note that there are downsides to type inference. Most notably, with too much type inference you quickly run into undecidability. Specifically, programs for whic
by rocqua 5y ago
Note that there are downsides to type inference.
Most notably, with too much type inference you quickly run into undecidability. Specifically, programs for which the question "is this well typed" is not decidable. (Essentially it allows encoding of paradoxes in the type system).
This is why Haskell and C++ do sometimes require types to be mentioned.
- foxes 5y agoI mean I am not sure that is a downside, just a limitation. Sometimes yes you have to specify if there is an ambiguity. I guess usually on input, but then that is not a huge price to pay.