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

Re: Re: Re: Short Circuit Operator and Hash Assignment

by hardburn (Abbot)
on Mar 17, 2004 at 17:33 UTC ( [id://337434]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Short Circuit Operator and Hash Assignment
in thread Short Circuit Operator and Hash Assignment

You're hitting an edge case. The optimization had a different situation in mind:

if( 1 && foo() ) { . . . } elsif( 0 || bar() ) { . . . }

This optimization is hardly unique to Perl. I believe both C and Java compilers will optimize away constants in exactly the same way.

----
: () { :|:& };:

Note: All code is untested, unless otherwise stated

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-25 15:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found