Hacker News new | past | comments | ask | show | jobs | submit login

My point being that when I ask why static is better (from people arguing that), they'll talk about compile-time checks, they won't talk about the tooling.

When I ask them to show me examples, they don't point to bugs that were prevented by compile-time checks, they'll point to how they find it easier to write code because the IDE suggests things.




I think it's hard to point to "bugs prevented by compile-time checks" because of the nature of type-checking.

I could just say that every time the compiler refuses to compile my code due to a type error a bug is averted. Typos, wrong method signatures, interfaces not implemented correctly. All those things had the potential to be bugs. Small, detectable and perhaps even non-breaking, but it's still good to catch them early on.

And of course, most of the time a good enough test suite would catch them. But having the compiler warning you is so much faster! And much more reliable too, because I'm not perfect and sometimes I make mistakes in my tests.


> When I ask them to show me examples, they don't point to bugs that were prevented by compile-time checks

Similarly, if you ask a writer who uses a pencil about the benefits of their approach versus a pen, they likely won't reference any specific times when they would have made un-erasable mistakes.


No dynamic type system can achieve the same safety properties as type systems like TyPiCal: http://www-kb.is.s.u-tokyo.ac.jp/~koba/typical/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: