Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Accessing Subroutine Arguments

by perrin (Chancellor)
on Apr 04, 2002 at 00:30 UTC ( #156508=note: print w/ replies, xml ) Need Help??


in reply to Accessing Subroutine Arguments

At eToys we made named parameters part of our coding conventions. It really helped, and I would recommend it as a good way to help keep stupid bugs out of your code.


Comment on Re: Accessing Subroutine Arguments
Replies are listed 'Best First'.
Re: Re: Accessing Subroutine Arguments
by kappa (Chaplain) on Apr 04, 2002 at 12:59 UTC
    Just wondering, do you use named params when a sub takes, say, only two params?
      If a sub takes only two params, and is not part of the public interface, it's a judgement call based on the likelihood of that sub growing in the future. If it's part of the public interface, I would used named params even if there was only a single one. It's insurance against changing a bunch of other classes later on.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2015-08-30 22:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (351 votes), past polls