Still not 77.
On 2012-12-07 02:55:44, masak wrote:
> <masak> rn: sub postfix:<+>($a) is looser(&infix:<+>) { $a; 77 }; say
> +6+ +8+
> <p6eval> rakudo 53daef: OUTPUT«83␤»
> <p6eval> ..niecza v24-5-g599cbcb: OUTPUT«77␤»
> <masak> hah!
> <diakopter> :D
> <diakopter> masak wins
> * masak submits rakudobug
> <moritz> should be 77
> <masak> then Niecza is right.
> <moritz> in case of no spaces, postfix wins over infix
> <jnthn> 6+ trigers the postfix
> <masak> so does 8+
> <jnthn> So we get 77
> <masak> oh, I see what you mean.
> <jnthn> We look for an infix next
> <jnthn> grr, this is hard to think about :P
> * moritz still isn't convinced
> <moritz> how is this beast parsed?
> * masak grins
> <jnthn> Well, I can see what's going on easy enough up to the final
> postfix.
> <moritz> ((+6)+ + (+8))+
> <moritz> that's how I'd expect it
> <moritz> and I guess that niecza does it that way
> <masak> right.
> <masak> and gets 77.
> <moritz> since the final postfix is looser than the infix, I'd argue
> that's correct
> <masak> I can get behind that.
> <masak> so, rakudobug.
> <masak> moritz: no, (((+6)+) + 8)+
> <masak> there are only two pluses between the 6 and the 8.
> <masak> so the second one must be an infix.
> <moritz> right
> <moritz> but still,the result should be 77
> <masak> aye.

Reply via email to