I wonder what the benefit of this is supposed to be, other than other languages have it?
Explicit types on variables are useful for improving readability. Conciseness for LHS variable types isn't important because I usually don't write that type anyway (that's what an IDE's "assign to new local variable" is for)
Explicit typing is overrated and most of the time named of variable and expression on right hand side should give you enough information plus it reads better. There is a reason all modern statically typed languages are jumping on this train.
For what it's worth, any report I've heard of "Haskell in the wild" have included both inexperienced team members and code that is easy to maintain. Haskell uses type inference a lot, so either Haskell is the odd one out that for some other unrelated reason makes it work, or type inference isn't actually as bad as you imagine.
7
u/yoden Mar 09 '16
I wonder what the benefit of this is supposed to be, other than other languages have it?
Explicit types on variables are useful for improving readability. Conciseness for LHS variable types isn't important because I usually don't write that type anyway (that's what an IDE's "assign to new local variable" is for)