Re:Why Crystal Is My Next Language
by vidarh on Monday June 11, 2018 @11:31AM
(#17285101)
While that is true, you still need to test to ensure that your representation matches reality, and in practice when you do that in systems written in dynamic languages you tend to cover most type issues implicitly.
For that matter it's not that hard to write code to statically validate that arguments to a given method are checked against a set of types and that this set does not include a representation of invalid values. (E.g. I can "forcibly" wrap any method with checks). The reason the various libraries to do that haven't gained much traction is that they've rarely paid for themselves in reduced effort compared to higher level tests.
I'm all for more static validation, but I just don't think we have suitable tooling yet to do it at a level that provides sufficient benefit.
For that matter it's not that hard to write code to statically validate that arguments to a given method are checked against a set of types and that this set does not include a representation of invalid values. (E.g. I can "forcibly" wrap any method with checks). The reason the various libraries to do that haven't gained much traction is that they've rarely paid for themselves in reduced effort compared to higher level tests.
I'm all for more static validation, but I just don't think we have suitable tooling yet to do it at a level that provides sufficient benefit.