On Tue, Nov 11, 2008 at 11:03:09PM -0600, Chris Dolan wrote:
> I'm thinking ahead to the Parrot equivalent of Perl::Critic, which I  
> hope will someday be able to analyze arbitrary .pbc files.  One problem I 
> foresee is that there seems to be no way to distinguish anonymous subs 
> ("my $f = sub { 1 };") from inner blocks.  Both compile down to something 
> like this:
>   .sub "_block16" :anon :lexid("23") :outer("21")
>
> Would it be feasible to add a new PIR adverb to mark anonymous methods 
> invented by the compiler so we can easily tell them apart from anonymous 
> methods invented by the programmer?  

I'm having trouble understanding "anonymous methods invented by
the compiler" in this context, probably because in a Perl 6
sense I don't think of inner blocks as being "invented" by the
compiler.  They're right there in the code where the programmer 
wrote them.

Perhaps you could clarify what you mean by "inner block" here?

Pm

Reply via email to