Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Re: (crazyinsomniac) Re: Coding superstitions

by seattlejohn (Deacon)
on Jan 15, 2002 at 12:24 UTC ( #138847=note: print w/replies, xml ) Need Help??

in reply to Re: (crazyinsomniac) Re: Coding superstitions
in thread Coding superstitions

FWIW, I prefer your version, simply because my brain effortlessly translates the else into $_[0] != 'ooyah', so it is immediately clear to me that the block gets executed if and only if $_[0] != 'ooyah'. I think I can understand the prof's desire for the "dangling return", but I also think it would require a few more clock cycles for my brain to look at that and be convinced exactly under which conditions 0 would be returned. (At the very least, I'd have to see the return 1 above to know that the return 0 would never get executed if the if was true -- because the if might just have done some work without actually returning...)

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2016-10-28 03:48 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (375 votes). Check out past polls.