3 ms·
I don't think there's a mass hysteria, is there? Certainly a few arrogant Haskellers, but I don't see an epidemic. Static typing eliminates an entire class of
by pi18n 14y ago
I don't think there's a mass hysteria, is there? Certainly a few arrogant Haskellers, but I don't see an epidemic.
Static typing eliminates an entire class of bugs. It's not like any of us need it, it's just a powerful tool. It might be a nice option in a Lisp if it could be done elegantly.
- dschiptsov 14y agoThose bugs are not a big deal. For a quick checking for correctness there is REPL, and because we're doing mostly functional programming (self-discipline) this is good-enough. For some protection from being called with wrong arguments there are assertions. Those who believe that a sophisticated type-system is a protection from idiots, rather than unnecessary burden, seems like come from a corporate Java world, where they believe that something decent could be created by a crowd of mediocre coders piling up "safe" or even "protected" crap. And of course, Unit tests and CI are our friends.)
- pi18n 14y agoI just know I've made some mistakes in the past that would have been caught by a type checker, and I'll probably make similar mistakes in the future. I like trying stuff in the REPL, but when an idea has solidified, I'd like to have it fully type check (along with using unit tests and CI). I guess it just doesn't seem like a burden to me; most of it is just preventing passing a variable as something it is not or double-checking that you've handled all the cases for Maybes and Eithers. It's all stuff I'd like to be doing anyway.