Re:Diminishing returns of static typing
by cm2187 on Monday October 02, 2017 @02:30PM
(#15386464)
If you have to write a test for every line of code you write, the "chatty" argument against static typing goes away.
[ Parent
| on HN ]
Re:Diminishing returns of static typing
by senorjazz on Monday October 02, 2017 @03:03PM
(#15386845)
and not just that, but for every possible case for the line you can think of. Like the post above, testing the results of a function returns a list for 1 item, or many items...
I see all too often, java bad, just look at how many lines you need to write to get "hello world". Who cares, the IDE generates that for you, but if you don't understand static void main as a beginner... again who cares, just put it in and ignore it until you need to understand it. Also read that dynamic languages are so productive, but they never mention you need to then write tests to detect what the compiler would catch for free. Yes good code needs tests, but the compiler IMO is a damn good built in test suite for catching many classes of errors