Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: empty 'else' block

by FoxtrotUniform (Prior)
on Nov 20, 2004 at 08:26 UTC ( #409233=note: print w/ replies, xml ) Need Help??


in reply to Re: empty 'else' block
in thread empty 'else' block

I'm not usually a fan of putting semantics in comments, but here I think I might make an exception for:

if(&predicate(...)) { &foo(...); } else { # do nothing }

It's a bit more explicit to some poor maintenance programmer than a lone, apparently useless, semi. Of course, if lone, apparently useless, semis are a coding convention for "do nothing" where you hack, it's okay. :-)

--
Yours in pedantry,
F o x t r o t U n i f o r m

"Anything you put in comments is not tested and easily goes out of date." -- tye


Comment on Re^2: empty 'else' block
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2016-02-14 02:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (455 votes), past polls