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

Re^3: shift vs @_

by Argel (Prior)
on Oct 02, 2006 at 20:39 UTC ( #575951=note: print w/replies, xml ) Need Help??


in reply to Re^2: shift vs @_
in thread shift vs @_

Actually, I think I will claim it is better. In theory it should be easier to notice changes since there is less clutter -- no leading "my" and no trailing "= shift" that someone eyeballing the code has to filter out so the variables themselves should stand out better.

Replies are listed 'Best First'.
Re^4: shift vs @_
by tomhukins (Curate) on Oct 02, 2006 at 20:44 UTC
    Perhaps, but consider the starting point of one argument:
    my( $foo, ) = @_;
    compared to:
    my $foo = shift;
    I use the shift approach because it gives me a clean starting point and lets me extend my methods (or subroutines) easily. Having said that, I try to avoid extending public methods and prefer to create new methods when appropriate. But perhaps I'm drifting away from the original question a little..

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://575951]
help
Chatterbox?
[stevieb]: Corion: the problem with that is the 2.36 represents the underlying C library I've wrapped, which is why I want to use incrementals after the real version number. I've emailed modules@ to see if they can expedite the process for me...
[stevieb]: ...as normally, it takes three days to delete, in case you want to change your mind

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2017-01-19 15:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (170 votes). Check out past polls.