Ingo Blechschmidt skribis 2005-10-10 19:36 (+0200):
> my @array = (42, "hi", (a => 23));
It is worth pointing out that the inner parens here are merely for
grouping: this information is lost afterwards, hence this:
> foo [EMAIL PROTECTED]; # same as
shouldn't be
> foo 42, "hi", (a => 23); # three positional params (Int, Str, Pair)
but instead
foo 42, "hi", a => 23 # two positional args, one named.
OR pairs need to remember whether they were originally in parens. This
is very doable, but whether we want or need it is very arguable.
(Very little sidenote: parameters are expected, arguments are passed. In
the signature, you have parameters, in the call, you have arguments.
However, in the case of a named argument, it does make some sense to
call the name parameter and the value argument, resulting in having both
in the call.)
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html