3 ms·
> Modules seem much more important than either of those. Modules solve an immediate and obvious pain: unacceptably long compile times. Sum types are more prof
by loup-vaillant 10y ago
> Modules seem much more important than either of those.
Modules solve an immediate and obvious pain: unacceptably long compile times. Sum types are more profound. Anyone having tasted an ML derivative (as I have) would dearly miss them. Seriously, once you've tasted sum types, you'll want to use them everywhere: option types, error returns, abstract syntax trees (JSON, XML, compilers…), you name it, sum types probably solve it.
Sum types are no panacea, but if you squint your eyes just right they're pretty damn close.
- revelation 10y agoI've tasted sum types and if I was trying to be snarky I'd say so have millions of Java enterprise developers who fill their code with a healthy dose of instanceof and null :) It is somewhat anathema to the OO idea and brings lots of (runtime) implementation concerns so I can understand the delay.