3 ms·
> People say this a lot, but it's not true unless you have 100% coverage, 100% control over the data that gets input into your program, and you can think of eve
by winstonewert 10y ago
> People say this a lot, but it's not true unless you have 100% coverage, 100% control over the data that gets input into your program, and you can think of every possible test case that covers every possible situation that can occur.
This is different from static typing, how?
> Many of the tests you have to write for programs in dynamic languages are simply not necessary for strongly typed languages.
Actually, dynamic typing users write very few additional tests. Users of static typing seem to imagine a lot of additional tests being needed, but dynamic typing users don't write them. They are usually for scenarios that are important enough to test.
> Furthermore, compilers for static languages catch (or warn about) a lot of problems that would otherwise have to be reproduced by the kinds of test cases nobody is likely to think of -- this results in bugs making it to production when you use dynamic languages.
Not my experience. Almost all bugs caught by static compilers are ones that a single execution of the relevant code would also catch.
- twblalock 10y agoYour experience must be limited.
- winstonewert 10y agoSure, instead of answering my questions or points try to dismiss me as not having experience. As a matter of fact, I have developed applications in Python, C++, Java, Javascript, GWT, Javascript, and Coffeescript, for myself, at small companies, and at Google. I don't think you can simply dismiss me as having limited experience unless you've got more extensive experience shipping apps written in both dynamic and static languages. Now, I'm not saying that dynamic typing is better: there are tradeoffs to either approach. But I am saying that your original post gives an overly simplistic appraisal. The pros and cons of static and dynamic typing and much more complicated then that.