Hi,

OK, finally I have time to look through this patch. Thanks for your patience while I did $REAL_LIFE for a bit.

First a general hint for future patches: please try and keep them at one feature per patch. This one targets a couple of distinct things as well as doing some clean-ups against some Perl 5-isms, which makes it a little harder to deal with. But I know it'd be a huge pain to get you to do that now, so I'll just work from this one as it is. :-)

Digging into the patch itself. I note you did some re-organizing of the grammar rules relating to parsing of routines and so forth. While I can see that this maybe simplifies the code, we are working towards converging on:
http://svn.pugscode.org/pugs/src/perl6/STD.pm
And your changes look to me to represent a step away from that in a chunk of the Rakudo grammar that currently matches STD.pm reasonably well. Therefore, I'm going to reject those changes. It may be that STD.pm could formulate these constructs more neatly, but I think it has reasons for doing it the way it has. The changes to the colonpair rule look to to be in the same boat too - I'm not sure why the | was changed to a ||, and the <variable> rule allows things that are not allowable in colonpair form.

Next I went through and manually applied all of the paren clean-ups. They all looked correct to me, so they all went in as r26519.

The scoping and name fixes for the colonpair method went in as r26524. I'm not quite sure what I was smoking when I wrote those (exhaustion is a more likely culprit). It'd be nice if the postcircumfix stuff was as simple as this patch attempts, but it doesn't appear to work, so I've skipped that bit. And I'm going to redo the variable variant of it to use desigilname, rather than variable, so it's inline with STD.pm.

For the lexical self stuff, it's very much needed. However, the implementation is a little tangled up in the moving of grammar rules. I'm not sure it supports nested methods properly, though I see a comment in there that suggests it should - I just can't see how at the moment (but I'm tired, so sorry if it does and I'm missing it). If you'd be willing to have another crack at this while leaving the grammar rules intact, I'd be happy to see that patch (don't worry about nesting for now, if you like - we can resolve that later...I'm happy to have improvements rather than stuff that's perfect right off; it's not like the stuff I commit is...).

Thanks for the patch, and please don't be discouraged from working on more because I didn't apply all of this. I'm happy to answer any questions about anything I mentioned, on IRC or in mail if I can't be found there.

Take care,

Jonathan

Reply via email to