laziness, impatience, and hubris | |
PerlMonks |
Re^2: Does anybody write tests first?by moritz (Cardinal) |
on Feb 22, 2008 at 14:56 UTC ( [id://669573]=note: print w/replies, xml ) | Need Help?? |
Before learning Perl I wrote some software in Eiffel, and they had that "Design by Contract" paradigm very early, and I used it extensively.
It helped, but it didn't replaced tests. Why? Because the code has to be run in order to check these precoditions, postconditions, class invariants etc. And if a method isn't called during testing, all your assertions are vain. I ended up rerunning the application all over just to make sure these assertions were executed and checked. But the test suite should have done that, not me manually. There's nothing wrong with DBC (and I like the fact that Perl 6 will come with it by default), but it's just not enough.
In Section
Seekers of Perl Wisdom
|
|