* Abigail <abigail@abigail.be> [2012-08-17T09:24:10] > For me, one of the few advantages I saw in using ~~ is not having to > wonder when to use == vs eq vs =~. The above table suggests that > > "0.0" ~~ 0 > > is false, while it's currently true. That bothers me. IMO, a "smart match" > should be able to say, "hmmm, both my operands look like numbers, you know > what, I'll use '==' to compare them!" > > Would this be workable: > > $a $b Meaning > ======= ======= ====================== > [...] > Any Looks like number $a == $b (without a "isn't numeric" warning) > Any Simple $a eq $b > Any Any fatal > [...] This is similar to something Damian suggested, which was == if both $a *and* $b look_like_number. I think that's less jarring to me, as I think I'd expect ("foo" ~~ "0e0") to fail. What do you think? At any rate, I'm not writing off the suggestion, and am going to sleep on it... fewer than 380 times. -- rjbsThread Previous | Thread Next