So what's the rationale behind the latest changes? I thought p6
consistently regarded the sigil as part of the name; seems like that
should go for named parameters, too.  In fact, sigils would seem to be
a good way to distinguish named parameters from pairs.

Alternatively, reserve either :k(v) or k=>v for named parameters and
use the other for pairs. I don't see the value of conflating those two
things syntactically - is it just for compatibility with p5 modules
that take their parameters as hashes?

I freely admit to myopia and a lot less time thinking about this
stuff, but using extra parens or autoquoting vs explicit quotes to
distinguish named params from pair arguments feels wrong.

On 8/25/06, Luke Palmer <[EMAIL PROTECTED]> wrote:
On 8/25/06, Michael Snoyman <[EMAIL PROTECTED]> wrote:
> I asked this same question on perl6-users, but no one really seemed to
have
> a definitive answer, so please forgive me for reasking.
>
> I was wondering how named arguments would work when parameters of
different
> types had the same name, ie sub foo($bar, @bar, &bar) {...}.

That's probably an error at compile time, given the new provision that
'@bar' => ... is not a named argument so we have no way to distinguish
between the parameters.

Luke



--
Mark J. Reed <[EMAIL PROTECTED]>

Reply via email to