Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Perl Best Practices for naming variables

by EvanCarroll (Chaplain)
on Aug 06, 2005 at 22:25 UTC ( #481560=note: print w/ replies, xml ) Need Help??


in reply to Perl Best Practices for naming variables

my $xXXxxX = 'Hooray lets all debate and negate styling practices. How useful. I prefer to call all my variables some permutation of Xs only differentiated by caps, that way I know they are all variables, and I don't even need sigils. My way is also better, in the event that perl ever drops the need for sigils, my variables will be easily distinguished from barewords! They can also dub over as binary where the lowercase is 0 and the upper 1'..
print $xXXxxX;



Evan Carroll
www.EvanCarroll.com


Comment on Re: Perl Best Practices for naming variables
Select or Download Code
Re^2: Perl Best Practices for naming variables
by creamygoodness (Curate) on Aug 06, 2005 at 23:23 UTC
    Well, I'm open to persuasion. For instance: another recommendation in the book is that you code in commented paragraphs, but limit those comments to a single line. Doing that will cause me some difficulty, as I occasionally write a paragraph that sacrifices some clarity for the sake of speed of execution, then compensate for the opacity of the code by overcommenting.

    Damian suggests that if you require more than one line to summarize a paragraph of code, you probably need to refactor it. From here on out, I will be thinking about that every time I find it challenging to summarize within a single line. It's a stylistic constraint, but it has architectural ramifications. Thought-provoking stuff!

    XOXO,

    --
    Marvin Humphrey
    Rectangular Research
    http://www.rectangular.com

      Doing that will cause me some difficulty, as I occasionally write a paragraph that sacrifices some clarity for the sake of speed of execution, then compensate for the opacity of the code by overcommenting.

      Of course you did profile the simple clear solution first before creating a more complex and harder to maintain solution - didn't you ? :-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (14)
As of 2014-12-19 21:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (92 votes), past polls