News for hackers. Stuff that matters.
Re:Poof and then Rails was gone by jowiar on Thursday May 15, 2014 @03:12PM (#7751532)
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.
Re:Poof and then Rails was gone by voxtex on Thursday May 15, 2014 @04:06PM (#7751886)
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.
Re:Poof and then Rails was gone by joncooper on Thursday May 15, 2014 @04:53PM (#7752174)
Indeed. Once you realize this it doesn't take very long to get excited about statically typed languages, especially with type inference.
[deleted]
Re:Poof and then Rails was gone by jowiar on Thursday May 15, 2014 @03:18PM (#7751577)
- "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.