Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: 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 reply to Re^2: Does anybody write tests first?
by moritz
|
|