in reply to Re: Being more Assert-ive with Perl
in thread Being more Assert-ive with Perl
Design By Contract does not seem to solve the problem, it only makes language translator complain a little earlier, does it?
Yes, but nothing can solve that problem really, since its "user error". I forgot where I heard it, but I have always like the quote: "Complain early and often" when speaking about error handling.
We need to test the code with both correct and incorrect input values in any case.
I agree. My point is that you can efficiently create those tests using this style and not have the overhead of full blown conditional blocks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Being more Assert-ive with Perl
by kappa (Chaplain) on Sep 17, 2004 at 15:33 UTC | |
by stvn (Monsignor) on Sep 17, 2004 at 15:42 UTC | |
by kappa (Chaplain) on Sep 17, 2004 at 16:18 UTC |