6 ms·
Why is an "exciting" (antonym to boring) language bad for this, and what makes a language "exciting"?
by lvh 7y ago
Why is an "exciting" (antonym to boring) language bad for this, and what makes a language "exciting"?
- cwkoss 7y agoStatic typing makes it easier to discover errors before the code is running in production.
- kasey_junk 7y agoThere is no rigorous study that has proven this. I wish there were because I strongly prefer static typing but it’s more a belief than anything proven.
- sethammons 7y agoI'm always surprised by what comes across to me as a dogmatic need for a "study" to prove something. There is no study that says my yard needs mowing once a week to look good. I know it because I've lived it. Similarly, I've lived in code bases that were once dynamic and were rewritten to be static. This is not an academic argument: the compiler catches things that I would otherwise have had to remember to put into a test.
- kasey_junk 7y agoMeanwhile I hate the look of tightly manicured lawns. You should definitely grow long grasses. Without a more rigorous set of criteria we are arguing opinion. While my opinion is the same on static types there are people with their own experience on the other side of the argument. They too have lived it.
- dagw 7y agoPerhaps, but how does static typing make a language 'boring' or dynamic typing 'exciting'. I certainly consider Elm and Haskell more 'exciting' than Python or PHP.
- devmunchies 7y agoreplace boring with safe. you get the point.
- kevin_thibedeau 7y agoRigorous, non-optional type checking isn't such a bad idea for high reliability.
- lvh 7y agoCounterpoint: Erlang. Also, if "rigorous, non-optional" is good, why would you want _Java_ and not, I dunno, Haskell or ML or some other powerful type system? Is there any evidence this bug would have been prevented in Java? If anything, Java is prime ground for the related YYYY vs yyyy formatter bug.
- enlyth 7y agoHiring pool for Java is orders of magnitude larger, let's not pretend this isn't an issue with esoteric languages like Haskell
- lvh 7y agoSo your argument is you need a language with static typing to prevent defects, but also the language must be proverbially this tall to ride, and so you end up with, say, Java?
- kevin_thibedeau 7y agoYou need a language that isn't prone to foot bullets in long lived code that will pass through many developers with varying degrees of experience. Ada, Rust, Java would be suitable. I'm not a huge fan of any of these but they are better than winging it on duck typing for mission critical code.
- yellowapple 7y ago> Counterpoint: Erlang. Not even that much of a couterpoint; if you want strict typing, you can do it in Erlang with pattern matching / guards and tagged tuples, and/or with Dialyzer and type annotations.