9 ms·
Learnt this in my compiler class.It was the most brutal week of my life.
by 3001 6y ago
Learnt this in my compiler class.It was the most brutal week of my life.
- jldugger 6y agoIMO, the most brutal week was realizing that nothing you will ever use on the job will use H-M type inference. Back to smashing rocks together.
- 3001 6y agoYou can go work for Jane street.
- nicoburns 6y agoPerhaps more achievable: iOS dev with Swift. Not technically HM I don't think, but it functions more or less the same.
- Klathmon 6y agoTake it from someone who has to occasionally work on an over complicated type system which uses HM inference, it ain't all that fun.
- AnimalMuppet 6y agoCould you be more specific? What makes it painful? (I mean, "overly complicated" is bad news no matter what the specifics of what we're talking about, but how does it cause pain when it's specifically in the types?)
- Klathmon 6y agoFor me personally it's just a lot of really heavy and very "meta" code that is really hard for me to reason about. I also touch it very rarely, so there's always a steep learning curve when I'm jumping back into it.
- GregarianChild 6y agoAlmost all modern statically typed languages use the ideas first coherently described in the Damas-Hindley-Milner approach. The main reason we do not see more full type inference, is that full type inference becomes uncomputable pretty quickly, once you move to more expressive typing systems.
- literallycancer 6y agoYou could use ReasonML in JS projects. It's even compatible with the rest of your codebase, if you don't want to start by rewriting everything.