Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

RE: a question on style

by nuance (Hermit)
on Jun 12, 2000 at 18:43 UTC ( #17711=note: print w/replies, xml ) Need Help??

in reply to a question on style

It is not bad form to leave out the else if you are not using it. In fact I would say that the opposite is the case, adding an unused else is merely cluttering the code.

I would consider you second exapmle to be a mistake, but that's just my opinion.

If you type perlman:perlsyn into the search box It'll bring up the syntax documentation. As you can see the if statement with no else is the first quoted example i.e. it is good style


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://17711]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2018-07-22 20:52 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (455 votes). Check out past polls.