On Mon, Apr 19, 2004 at 09:42:14AM -0700, Dave Whipp wrote:
: "Trey Harris" <[EMAIL PROTECTED]> wrote i
: > It's easy to just say "don't nest placeholder-using closures," but that
: > doesn't seem workable in practice since every block is a closure, unless
: > placeholders are forbidden from all but the most trivial cases.  Absurdly
: > trivial, it seems.  How about
: >
: >   $sub = { if $^a { $^b = $^a } };
: 
: I would like to think that not all blocks have the same context. We could
: define a "placeholder" scope as being a lexical scope that sends data to a
: block. Thus C<for>, C<map, C<grep> etc., all introduce lexical scopes that
: are tagged as placeholder scopes; but C<if> and C<while> do not. Its a bit
: like an inside-out-in-reverse C<wantarray> concept.

We can certainly outlaw placeholders in scopes that already specify
the argument list externally (including when there are no arguments
for C<if> et al.).  But what we're *not* going to do is complexify
the rules about which closure the placeholders try to bind to in the
first place.  Useless generalization is a really good place to trim
the complexity of a language.  And generalizing placeholders would be
useless, in my estimation, particularly since we introduced the ->
notation as an intermediate form specifically to take away the need
to generalize placeholders.

Larry

Reply via email to