From: "Patrick R. Michaud" <[EMAIL PROTECTED]>
   Date: Thu, 10 Jul 2008 21:51:40 -0500

   On Thu, Jul 10, 2008 at 09:35:29PM -0400, Bob Rogers wrote:
   . . .
   > [...]  However, if some
   > or all of these references were "downward" (i.e. not referenced after
   > the containing block returns), then the compiler need not implement
   > those subs via closures.  In Parrot, the two available technologies for
   > doing this are inlining, and generating bsr/ret subroutines.

   ...but those technologies are available only if the nested closures 
   don't have any local lexicals of their own.  If they do, then we still
   need a separate .sub to be able to hold their lexicals.

Hmm . . .

   Unfortunately, at this point in the discussion I don't feel I 
   understand enough about closures and lexicals to be able to 
   posit what S04 is really talking about, or to helpfully respond to
   the points and questions you're raising--which I'm sure are good
   ones.  I think I need to take a break from this topic for
   a while, because it's highly frustrating to me right now.

No problem; I wouldn't mind a break, either.

   (None of what you're saying or doing is the source of that
   frustration . . .)

Nothing you've said could be construed that way, but thanks for making
it explicit.

   . . .

   >    So you are definitely using "autoclose."  In fact, your RT#56398
   > ticket effectively asks to extend this feature so that it updates the
   > outer_ctx on *every* call, which (as implemented) breaks newclosure.

   If that's what I was effectively asking in RT #56398, it was
   *completely* unintentional on my part.

Granted; and the breakage was an unintended side-effect in any case.
I'm pretty sure I can fix it to everybody's satisfaction, but I was
waiting for this thread to stabilize first.

   All I'm really wanting to know is what
   PIR the compilers and tools should be emitting for these very
   common Perl 6 constructs, and to have that PIR work in Parrot.
   Trying to get simple nested blocks and subs containing lexical
   variables to work in Rakudo and NQP has been and continues to be 
   a very frustrating trial-and-error exercise, and I just want
   (pardon the pun) closure.

;-}

Seriously, though, I've been wanting to learn more about Rakudo and PGE
for a while now.  If you have some specific problems in this area that
you'd like to point me at, that might make a good start.  (Not that I
have much Parrot-hacking time to spare.  But you probably already know
that.)

   Thanks again for bearing with me on this, and my apologies for
   not really being able to respond to the points you're raising.

   Pm

No problem; I was pretty sure you weren't in a position to answer all of
them.  I was hoping we'd get clarification from more knowledgeable
parties.  (Hint, hint!)  But even so, I've learned from this thread.

                                        -- Bob

Reply via email to