On 8/26/06, Audrey Tang <[EMAIL PROTECTED]> wrote:
Mostly, it's that func('&x' => 1) requires a bit too much typing, and also
makes it hard for func() to change its signature later on to accept things
other than Code.
Allow me to make an immodest proposal. Have named parameter passing
look lik
Mostly, it's that func('&x' => 1) requires a bit too much typing, and also
makes it hard for func() to change its signature later on to accept things
other than Code.
I was discussing this with a friend of mine (Eric Livak), and he suggested
making the sigil on the name optional for disambigua
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
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
2006/8/26, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
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
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
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 f
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) {...}. I wrote a
little script to
Carl Mäsak skribis 2006-08-23 21:54 (+0200):
> Juerd (>), Michael Snoyman (>>):
> >> sub mysub($foo, @foo, %foo) {
> >I hope this is a compile time failure. If not, I'd expect a warning, at
> >least.
> Why? It looks reasonable IMHO.
Because arguments are passed without sigil, and here you'd be for
Juerd (>), Michael Snoyman (>>):
> sub mysub($foo, @foo, %foo) {
I hope this is a compile time failure. If not, I'd expect a warning, at
least.
Why? It looks reasonable IMHO.
// Carl
Michael Snoyman skribis 2006-08-23 12:10 (-0700):
> sub mysub($foo, @foo, %foo) {
I hope this is a compile time failure. If not, I'd expect a warning, at
least.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.
Hi,
I'm just starting with Perl 6. I was reading through "Perl 6 and Parrot
Essentials" (finally arrived yesterday from Amazon; very happy) and I was
wondering what would happen if you had a parameter list that included
variables of a different type but the same name (ie, $foo, @foo). I wrote a
12 matches
Mail list logo