laziness, impatience, and hubris | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
[...]That is an idiom which is disparaged these days as too admissive of bugs. It is disparaged by some people. I've repeatedly criticized people for disparaging it without specifying what one should replace it with. I find the most obvious way of not using it to be too likely to produce way-too-confusing errors: and produces the following output: which I'll bet would confuse the vast majority of module users. If you are going to spread Cargo Cult FUD about then at least take the responsibility to tell people what you suggest they replace it with! Perhaps even keep handy a link to a discussion of both sides of the controversy. I have my own techniques for avoiding such problems when I feel it is appropriate (usually by having my class and instance methods in different name spaces) which are way too much trouble to be the default idiom for writing OO Perl. So I advocate people follow this fine example found in the standard Perl documentation until such time as they feel the desire/need to move to more advanced techniques that can properly address class/instance method collisions without introducing such horridly confusing possibilities.
- tye In reply to Re^2: A few Perl OOP questions. (disparaging)
by tye
|
|