3 ms·
If it was just simple type annotations, type synonyms for domain modeling, I’d agree. It’s not at all though. Just consider how extremely hard it is to set up s
by mlthoughts2018 7y ago
If it was just simple type annotations, type synonyms for domain modeling, I’d agree. It’s not at all though. Just consider how extremely hard it is to set up systems of dynamic dispatch in Haskell.
I do however think the “types help me reason about code faster” argument is a lot of bollocks. Years of experience working in large enterprise Haskell & Scala codebases made me believe this is not true at all.
- mntmoss 7y agoI do find types helpful in smoke testing greenfield code where it needs to deal with structured data and references. But definitely the more complex approaches to typing have sharply diminishing returns. The static invariants I start caring about in complex scenarios are more along the lines of contracts or structured concurrency, and I don't want to reason about those with types.
- Ericson2314 7y agoWhen is "dynamic dispatch" a business requirement? You clearly are trying to put square pegs in round holes for no reason other than habit. Passing in a value containing s function isn't hard, but I very rarely want to do it.
- Quekid5 7y ago> Just consider how extremely hard it is to set up systems of dynamic dispatch in Haskell. What? Make a record of function values. Done. You can also go with an existentially qualified type with type class constraints if you just want the moral equivalent of [Show _], say.