Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^6: Strange given/when deparsing

by TimToady (Parson)
on Jun 09, 2009 at 19:27 UTC ( #770067=note: print w/ replies, xml ) Need Help??

in reply to Re^5: Strange given/when deparsing
in thread Strange given/when deparsing

Yes, Perl 6 gave whiplash to Perl 5 here; originally it was defined symmetrically, but we broke that after we realized it was silly to define a switch that was impossible to optimize to a jump table even if all the "when" values are small integers. The right side of a smart match is now always considered a pattern that makes its own decision how to match the left side, and it might or might not pay attention to the type of the left side to do so. In Perl 6, integer patterns always do integer comparison, and string patterns always do string comparison, regardless of the structure of the left side.

Comment on Re^6: Strange given/when deparsing

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2015-10-04 21:30 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (105 votes), past polls