4 ms·
When proponents of dynamic languages tell me "that's what the unit tests are for", I say good for you that you have unit tests. However a unit test may simply
by cjdell 6y ago
When proponents of dynamic languages tell me "that's what the unit tests are for", I say good for you that you have unit tests.
However a unit test may simply inform you that you have something wrong with your program, whereas a type checker will (more often that not) show you exactly where the error is, and usually as you were typing it.
Reality is that unit tests and type checking both have their place even if there is overlap between the two. Type checkers can however remove the need for trivial and repetitive unit tests.
- david422 6y agoThe type checker may as well be one big automated unit test. For all the time a developer spends not writing out types, it then has to be made up in manually written unit tests.
- dehrmann 6y agoI'd rather my IDE flag the type error before going to the effort of running a unit test. That, and I never have to ask myself what type a parameter is.
- deleted 6y ago[deleted]