Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: ?: = Obfuscation?

by ikegami (Pope)
on Dec 01, 2006 at 20:31 UTC ( #587298=note: print w/replies, xml ) Need Help??


in reply to Re: ?: = Obfuscation?
in thread ?: = Obfuscation?

And dead set against this:

my $x = $y > 5 ? ($y = 0) : ($y = 1);

As you should be.

my $x = ($y = $y > 5 ? 0 : 1);

and

$y = $y > 5 ? 0 : 1; my $x = $y;

are much more readable.

Replies are listed 'Best First'.
Re^3: ?: = Obfuscation? (= =)
by tye (Sage) on Dec 01, 2006 at 22:18 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://587298]
help
Chatterbox?
[LanX]: oh I see - a deeply buked discussion
[erix]: auto-da-fe duncey hats
LanX can only recommend css settings hiding certain monkssess ;)
[LanX]: I can't hear the word inquisition without Mel Brooks jumping in front of my inner eye

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2017-01-18 00:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (159 votes). Check out past polls.