# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #75368] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=75368 >
<pmichaud> actually, $i !~~ any(|$nth) should be the same as !($i ~~ any(|$nth)) iiuc <moritz_> the negation comes at the end <pmichaud> negations and junctions are problematic <pmichaud> (in general) <masak> apparently so. <masak> I accept what you're saying, but I can't see how it works out that way. <jnthn> To the point that the spec in one place suggests a warning. <masak> how does the ! end up outermost? <pmichaud> it's a metaop <pmichaud> it always ends up "outermost" <jnthn> masak: All ! meta-ops are like that. <masak> the ! metaop ends up outside of junctions? cool! <jnthn> $a !== $b is !($a == $b) really <masak> jnthn: oh, indeed. <masak> so this doesn't go for the infix:<ne> operator? <moritz_> nope <moritz_> that's not meta-y <moritz_> so !eq is not quite the same as ne, when junctions are involved <moritz_> masak: that's a good item for our best practise list <jnthn> btw, Rakudo's ne is implemented in terms of !eq <jnthn> If you want to avoid the inconsistency, then change infix:<ne> to take two Mus. <masak> jnthn: so maybe that's a potential bug in Rakudo? :) <jnthn> masak: Only if we can decide what the spec is. ;-) <masak> didn't we just do that? * jnthn would kinda feel more comfortable if they were the same. <moritz_> rakudo: say 1 ne 1|2 <p6eval> rakudo 240400: OUTPUT«any(Bool::False, Bool::True)» <moritz_> rakudo: say 1 !eq 1|2 <p6eval> rakudo 240400: OUTPUT«0» <moritz_> that's correct as I understand the current spec <masak> so it's actually correct? hooray! <jnthn> masak: Or if we should mark ne and != as having Mu parameters. <jnthn> So they work out the same as !eq and !== <masak> jnthn: I don't see why we should. <mathw> I'm wondering how often it's going to bite people <mathw> And if we want to allow the distinction <mathw> Is it potentially useful? <pmichaud> as I read the spec, infix:<ne> is supposed to be the same as !eq <pmichaud> i.e., it's just a shortcut. <masak> so it is a bug? <moritz_> masak: only by pmichaud++'s interpretation * masak submits rakudobug <masak> that's enough for me. :) <mathw> I'm not convinced <pmichaud> S03:1189 <pmichaud> As in Perl 5, converts to C<Str> before comparison. C<ne> is short for C<!eq>. <moritz_> ok <moritz_> that's enough for me :-) <pmichaud> also later at S03:3915