2 ms·
Restricting input based on type hierarchies can reduce a certain class of bugs, yes, but careful use of guards as well as typespecs and unit test coverage (whic
by pmarreck 11y ago
Restricting input based on type hierarchies can reduce a certain class of bugs, yes, but careful use of guards as well as typespecs and unit test coverage (which you should have, anyway) can accomplish much of what type restrictions can
- pmarreck 11y agoWas something I said factually wrong? User im_down_w_otp put up an example of what I'm talking about (minus the unit testing) so what gives?
- sagichmal 11y agoI suspect dismissing static typing whole cloth with "unit tests and certain guards can give you most of the benefits" comes off badly to some people.
- pmarreck 11y agoI don't see how "can accomplish much of what type restrictions can" is the equivalent of "dismissing static typing whole cloth" I choose wording carefully for a reason