Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Re: Re: Perl Naming Conventions

by halley (Prior)
on Apr 28, 2003 at 19:51 UTC ( [id://253810]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Perl Naming Conventions
in thread Perl Naming Conventions

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.

--
[ e d @ h a l l e y . c c ]

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://253810]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-03-19 09:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found