Andrew J Bromage <[EMAIL PROTECTED]> writes:
> On Sat, Apr 20, 2002 at 10:06:10PM -0700, Steve Fink wrote:
>>  - Local label addresses are only valid within the scope containing
>>    the label (the result of jumping to someone else's local label is
>>    undefined, possibly triggering an exception in debug mode.)
>
> At the moment, scope == module.  In the future, I can think of
> several meanings for "scope" which make sense, but
> sub/method/function works for me too.
>
> I think there is a good argument to be made for limiting the
> organisation of bytecode files to have only one sub per code block,
> but I'm not sure the argument necessarily applies to Parrot.  The
> JVM has this constraint, but it also doesn't easily support
> languages with Wirth-style nested subroutines.  Parrot probably
> doesn't want to go to a great deal of trouble to support them, but
> we don't want to make it unnecessarily painful, either.

Um... If you're talking about what I think you're talking about you
should remember that Perl 6 is going to have nested subroutines, both
private and public:

  sub fact($n) {
    my sub tail_fact($n, $i) {
      when 0 { return $i }
      default { tail_fact($n - 1, $i * $n) }
    }
    fail_fact($n, 1);
  }

Or are 'Wirth style' nested subs different?

-- 
Piers

   "It is a truth universally acknowledged that a language in
    possession of a rich syntax must be in need of a rewrite."
         -- Jane Austen?

Reply via email to