Comment on Poof and then Rails was goneComments−jowiar12yWhen I read code like this and find that half of the tests are, more or less, a typechecker, it reduces to an argument for static typing.−voxtex12yCompletely agree with you. Many of the tests don't do any kind of assertion, simply ensure that an exception isn't thrown on the invocation of a method. An interface defined in a static language would render the majority of these tests unnecessary.−joncooper12yIndeed. Once you realize this it doesn't take very long to get excited about statically typed languages, especially with type inference.−[deleted]12y[deleted]−jowiar12y- "returns a saveable object"- "accepts an employee with a notice: option"- "accepts :new"- "returns a hash with :name"Are all within the scope of a typechecker.
Comments
When I read code like this and find that half of the tests are, more or less, a typechecker, it reduces to an argument for static typing.
Completely agree with you. Many of the tests don't do any kind of assertion, simply ensure that an exception isn't thrown on the invocation of a method. An interface defined in a static language would render the majority of these tests unnecessary.
Indeed. Once you realize this it doesn't take very long to get excited about statically typed languages, especially with type inference.
[deleted]
- "returns a saveable object"
- "accepts an employee with a notice: option"
- "accepts :new"
- "returns a hash with :name"
Are all within the scope of a typechecker.