I would like to end this behavior. At the PIR level, I think that
"self" should have to be manually specified with a ".param"
declaration or equivalent. At the NQP and Winxed level, of course,
user-visible behavior does not need to change. Any languages using a
custom parameter binding (e.g. Rakudo) would also likely remain
completely unmodified.
Assuming there are no major complaints, I would like to start a branch
to work on this issue soon. The first step would be to add behavior to
IMCC that if the first .param is named "self" we don't automatically
prepend another self variable to the front of the list. As an example,
currently this throws a runtime error about not having enough
parameters passed, but does not throw a compile-time error about a
"self" parameter being defined twice:
.sub foo :method
.param pmc self
say self
.end
The second step of the switch would be to remove automatic "self"
magic and fix whatever errors pop up from that.
This is a nit that we've discussed in the past, and decided previously
that it wasn't worth the energy to fix. However, now this is standing
in the way of some real improvements to PCC and IMCC and I would like
to work on dealing with it now.
I would love to hear what other people think. Thanks.
--Andrew Whitworth
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev
--
Jonathan "Duke" Leto <jona...@leto.net>
Leto Labs LLC
209.691.DUKE // http://labs.leto.net
NOTE: Personal email is only checked twice a day at 10am/2pm PST,
please call/text for time-sensitive matters.
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev