"Bryan C. Warnock" wrote:
> On Monday 10 September 2001 09:30 pm, Dan Sugalski wrote:
> > gotos into scopes might not be allowed.
> 
> That's how it currently is for most scopes, and it certainly saves a
> whole lot of trouble and inconsistencies.

I'm not sure I understand what you mean. Perl 5 allows us to enter
and leave scopes with goto:

  sub foo {
    my($x, @y) = @_;

    if ($x) {
      goto START;
    }

    while (@y) {
      $x = shift @y;
  START:
      print "$x\n";
    }
  }

And of course the keywords last, next and redo are just restricted
gotos. Those are able to leave one or more scopes.

It isn't clear to me that explicit ops are the way to go
for scope management -- that seems to shift the burden of scope
management onto the compiler. A declarative interface between
the compiler and interpreter might be best. The compiler will
probably need that for communicating debugging info anyways.

- Ken

Reply via email to