Your first example shows a limitation with Perl. By being forced to use a conditional to deal with the number of arguments, we automatically introduce more chances for bugs because every conditional is an opportunity for bugs to arise.I have two problems with this: 1. what's going to cause more errors, a condition or copying whole methods? 2. if a method does different things with different arguements, why is it called the same thing?
The fewer conditionals you have, the fewer bugs you're likely to have.The less code you have the fewer bugs you're likely to have surely?
In reply to Re: Re: Re: Re: perl6 & OO
by Anonymous Monk
in thread perl6 & OO
by chance
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |