3 ms·
> in the future, our type systems will be so powerful they'll be able to do more inference so that we have to be less explicit And in the past too! In my Hask
by mrkeen 3y ago
> in the future, our type systems will be so powerful they'll be able to do more inference so that we have to be less explicit
And in the past too!
In my Haskell workflow I constantly use the _ (typed hole) keyword. When the compiler hits that expression, it tells me what type I have to put there.
If I were using Idris, it can oftentimes provide and implementation too!
Two caveats about what you said though:
- More power is not always better (depending on how you define power). Structured programming removes the power of goto. Functional programming removes the power of mutation.
- There are limitations to what can be inferred. The more your type system can do, the harder it is for type inference to do its thing.