4 ms·
Moreover, they don't really show anything to make their point — I can't see any type annotations on the frontpage.
by ealhad 8y ago
Moreover, they don't really show anything to make their point — I can't see any type annotations on the frontpage.
- HindleyMilnerTI 8y ago> it's 2018 > type annotations https://en.wikipedia.org/wiki/Type_inference https://en.wikipedia.org/wiki/Type_inference
- leshow 8y agoType annotations can be helpful in writing maximally polymorphic code and in self documentation, independent of type inference. When I write Haskell, I still annotate my code.
- always_good 8y agoAlso, throwing out all type annotations makes code pretty hard to read, especially outside your IDE like in a Github repo. Taken to an extreme, it feels like reading a dynamically-typed language where you have to keep the various variable types in your head when debugging. There's a middle ground.
- always_good 8y agoPretty lazy comment. There's a reason you still at least annotate the top level in Haskell, Elm, and friends even though the compiler could've inferred it. It's because humans have to read it.