We don't bite newbies here... much | |
PerlMonks |
Re: Re: Re: Perl Naming Conventionsby halley (Prior) |
on Apr 28, 2003 at 19:51 UTC ( [id://253810]=note: print w/replies, xml ) | Need Help?? |
If more than two modules do it, it's a convention. In all matters of style, "consistency isn't." That said, the convention of passing named pairs is pretty commonly used. Whether the names are capitalized or punctuated varies. Whether the pairs are stored as attributes, or invoke special features, varies. It's enough of a convention that I hear that perl6 will offer a couple new features for parameter-checking these named arguments. I'd say the get_ and set_ naming idea is more of a porting convention to be similar to languages that can't overload their methods. The style I proposed above wouldn't work in languages or libraries which couldn't distinguish the calling context or treat the arguments differently. --
In Section
Seekers of Perl Wisdom
|
|