Larry:
> >     sub bar(; $foo = <topicmumble>) {...}
Damian:
> topic [would be] C<undef>.

I assumed <topicmumble> implied an 'is given'.
I don't see why it couldn't.


Damian:
> Hmmmmm. Given that the topic is in some sense
> a property of the lexical scope of the subroutine
> body, this might be a possibility:
>
> sub bar($foo is MY.topic) is given($whatever) {...}

Isn't this confusing dynamic and lexical scopes?
Perhaps:

    sub bar (;$foo = YOUR.topic) { ... }
    sub bar (;$foo = CALLERS.topic) { ... }


> >     sub bar(*@args = $<mumble>) {...} # default to [$_]
> >
> > What <mumble> might be is an interesting, er, topic.
> 
Damian:
> I would argue it ought to be just $_

You seem to be saying one could write:

    sub bar (;$foo = $_) { ... }

Btw, can one write any/all of these and
have DWIMery:

    sub bar (;$_) { ... }
    bar ( _ => 1 );
    sub bar (;$_ = $_) { ... }

As other's have suggested, a mumble of
$CALLERS::_ makes sense:

    sub bar (;$foo = $CALLERS::_) { ... }

but I can see the point of a different
syntax dedicated to just the upscope topic
to avoid encouraging wider use of $CALLERS.

Hmmm.

--
ralph

Reply via email to