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

Re^2: keywords versus variables

by rvosa (Curate)
on Aug 30, 2007 at 18:00 UTC ( #636149=note: print w/replies, xml ) Need Help??


in reply to Re: keywords versus variables
in thread keywords versus variables

I think perhaps it's balanced against other issues, though, and shouldn't necessarily be a singular goal.
Oh, definitely. It's a bit of a silly "metric", of course. My point about the complex data structures was that, if you have to do
$blah->{something}->{and_deeper}->[12]
you'll be pretty bug prone and so you might consider refactoring into something like
$deeper->item(12)
...which is why I put method calls on one lower level of egregiousness :)

Replies are listed 'Best First'.
Re^3: keywords versus variables
by mr_mischief (Monsignor) on Aug 30, 2007 at 18:17 UTC
    Good point. Even if you are doing the former on some level, hiding it behind the latter for most code should still help cut down on bugs. Doing the complex one in one place and the simple one in lots of other places could be quite a maintenance win.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://636149]
help
Chatterbox?
[karlgoethebier]: The early bird catches the worm
holli enters he monastery hall, freezing but happy to have built the most beautiful snowman in the history of mankind
[holli]: tbh, the thing looks more like quasimode but hey, the thought matters. and it has blue LEDs as eyes
[holli]: we had solid 8cm fresh snow overnight. that is quite unusual for the area

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2017-12-18 05:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (467 votes). Check out past polls.

    Notices?