4 ms·
"My answer to that is that even using a dynamically typed language I don’t have to write the test for nil because I know that nil will never be passed. I don’t
by tpush 7y ago
"My answer to that is that even using a dynamically typed language I don’t have to write the test for nil because I know that nil will never be passed. I don’t need to make states unrepresentable, if I know those states will never be represented."
You don't know that nil or whatever "won't ever be passed" in dynamically types language!
The fact that Bob Martin, a supposedly experienced software developer, genuinely, sincerely argues a variation of "I don't need to handle this case, since I just know that this can't happen because... Obviously no one, certainly not me would do that" is inconceivable.
Does he not even consider what happens when someone else, i.e. no him, passes "unrepresented" values to his function? WTH?
- chickenfries 7y agoHow a consultant could ever have this view baffles me.