Re:Kent Beck: “I get paid for code that works, not for tests...
by jon-wood on Thursday December 08, 2016 @10:34AM
(#13130885)
A type system and static analysis certainly allow you to stop writing a certain category of test as you no longer need to assert that a method being passed an object of the wrong type copes with that. It doesn't completely relieve of you the need to test though as a type system won't assert that the code you're writing actually fulfils the businesses requirement that nothing can be ordered for same day shipping after 11am.
[ Parent
| on HN ]
Re:Kent Beck: “I get paid for code that works, not for tests...
by gaius on Thursday December 08, 2016 @12:23PM
(#13132040)
You absolutely can do that with the type system, use a constrained subtype.