# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #114026]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=114026 >


<quietfanatic> rn: class A { method postcircumfix:<( )> (A:U:) { say 3 } }; A()
<p6eval> rakudo 57eaaa: OUTPUT«Too many positional parameters passed;
got 2 but expected 1␤  in method postcircumfix:<( )> [...]
<p6eval> ..niecza v19-12-gf36d743: OUTPUT«3␤»
<quietfanatic> niecza++
<pmichaud> r: class XYZ { method postcircumfix:<( )>(XYZ:U: $x) { say
3 } };  XYZ(0)   # checking
<p6eval> rakudo 57eaaa: OUTPUT«3␤»
<pmichaud> r: class XYZ { method postcircumfix:<( )>(XYZ:U: $x) { say
3 } };  XYZ()   # checking
<p6eval> rakudo 57eaaa: OUTPUT«3␤»
<pmichaud> hmmmm
<pmichaud> r: class XYZ { method postcircumfix:<( )>(XYZ:U: $x) { say
3 } };  XYZ(3,4,5)   # checking
<p6eval> rakudo 57eaaa: OUTPUT«3␤»
<pmichaud> I bet Rakudo is always expecting a Capture of the arguments there.
<quietfanatic> huh
<pmichaud> r: class XYZ { method postcircumfix:<( )>(XYZ:U: $x) { say
$x.WHAT } };  XYZ(3,4,5)   # checking
<p6eval> rakudo 57eaaa: OUTPUT«Capture()␤»
<pmichaud> *ding*
<quietfanatic> Where does that capture come from?
<pmichaud> it's the capture formed by the arglist to the .( ) call
<quietfanatic> oh, so
<quietfanatic> r: class XYZ { method postcircumfix:<( )>(XYZ:U: $x) {
say $x[1] } };  XYZ(3,4,5)   # checking
<p6eval> rakudo 57eaaa: OUTPUT«4␤»
<quietfanatic> er
<pmichaud> I'm not sure it's _correct_; that just appears to be what
Rakudo is doing.
<quietfanatic> r: class XYZ { method postcircumfix:<( )>(XYZ:U: $x) {
say $x } };  XYZ(3,4,5)
<p6eval> rakudo 57eaaa: OUTPUT«3 4 5␤»
<quietfanatic> yeah I'm pretty sure that's wrong.
<quietfanatic> where's masakbot?
<sorear> quietfanatic: 3,4,5 are being wrapped into a capture.
<quietfanatic> Yes, but the signature should unwrap the capture.
<pmichaud> there may be some circularity sawing taking place there...
probably need to check with jnthn++, too.

Meanwhile, later...

<masak> re http://irclog.perlgeek.de/perl6/2012-07-07#i_5793473 -- I
agree with quietfanatic++, and I think sorear++ changed the spec and
fixed Niecza to be more consistent and simpler in this regard. I don't
believe there are circularity issues.
<masak> if jnthn concurs (or doesn't fly into a tantrum about having
to change this bit), I'll submit a rakudobug.
<jnthn> It used to be spec'd that way.
<jnthn> I agreed it could change already.
<jnthn> Rakudo didn't get updated yet.
<jnthn> It was mostly SMOP that wanted it to be the other way, fwiw.
<masak> yes, I remember that bit of input coming from pmurias++ and ruoso++
* masak submits rakudobug
<jnthn> That particular circularity saw doesn't apply to anything
6model-y. 6model doesn't care for captures in any sense, and the
invocation protocol is specified as VM specific.
<jnthn> Rakudo's postcircumfix:<( )> isn't the invocation protocol in general.
<jnthn> SMOP tried to make it that way, which was why it wanted said
circularity saw, iirc.
<jnthn> .oO( Can I just fix this, or do I have to think about
deprecation policy... :-) )
<masak> the invocation protocol is VM specific, but I do hope the
expected parameter list for postcircumfix:<( )> isn't.
<jnthn> masak: That was kinda my point. What postcircumfix:<( )> does
isn't anything to do with the VM's view.
<masak> ok ok good.
<masak> that's probably wise.

Reply via email to