On Wed, Sep 24, 2008 at 10:44:23PM -0600, Tom Christiansen wrote:
> In-Reply-To: Message from Geoffrey Broadwell <[EMAIL PROTECTED]>
> > Don't we have to solve all this to get the Perl 6 debugger
> > working anyway?  
> 
> Although I'm unsure why that might be, I also recognize the possibility
> that there may well exist hypothetical documents, unread by me, which
> mandate some scenario or behavior wherein the answer to your question 
> can only be yes.  
> 
> However, from a perl5 perspective, the answer is surely not.

First, a big thank you to Tom for the time and effort spent in
describing the perl5 perspective here.  I've not had much (okay, any)
experience with "the debugger" in perl5, so reading Tom's description
has greatly increased my understanding of what we may be looking at for
Perl 6, and calms a few minor anxieties I had on the topic.  So, this
message was a big help to me and I really appreciate it.  :-)

To respond to a couple of other items I saw in the message:

> I'm going to do a quick review of *why* that answer is "surely not" before
> then going on to consider whether perhaps this *might* not apply to perl6
> and ask that, should this indeed be what's afoot, that I be gently 
> enlightened.

As far as I'm aware, there's nothing in the current Perl 6 design 
or synopses that indicate that things are substantially different
in this area from Perl 5.  So, I'm comfortable that what we have
thus far in a lexicals redesign for Parrot doesn't cause a
conflict here.

> [...]
> However, I have no idea whether Parrot might not change all of this
> existing situation around completely.  I'm completely ignorant of 
> this, but I'd not be astonished to learn it did.
> 
> If you told me yes, that's what happens, and then pushed me into guessing
> why, I'd only get as far as making the uneducated guess that this must
> somehow be due to *its* own assumptions, constraints, or expectations about
> just what it means to execute newly eval code "in scope".
> 
> Is this so, or is it not so?

Taking a pure Parrot perspective, Parrot doesn't and probably
shouldn't impose a particular view of debugging on the languages it
supports.  Clearly we can support the style of debugging and interactive
execution that you've described happens with perl 5, but Parrot might 
also come across a dynamic language where eval'd code is "in scope" 
and can modify the current lexical environment.  So, while Parrot
probably won't impose this view on Perl (5 or 6), it may still
need to evolve to support it at some point.

What I can say with confidence is that what we have so far in 
Parrot today acts pretty much as you've described, and that in the
lexical redesign work I'm doing now I'm explicitly not (yet?)
addressing the situation of an eval being able to modify the
(outer) scope in which is embedded.  But I'm also fairly 
comfortable that the design I'm putting together can (with
not too much work) accommodate that capability if/when we decide
that Parrot needs it.

>From a Perl 6 perspective, given that Pugs provides an interactive
mode where one can do "my $variable" and have it stick, it
may be that this becomes a standard feature in Perl 6 in
general.  Fortunately that's not my call, but I can see why people
may want something like it for Rakudo as well, and people running
Python on Parrot will certainly expect interactively entered
lexical variable declarations to work.

Anyway, none of what I've said above should be taken as Parrot
or Perl's "official" stance; it's just how things currently look
to me.

Thanks again for the excellent and helpful message.

Pm

Reply via email to