Michael Lazzaro wrote:
If the usual syntax for a 2-arg subroutine call is:

   foo A, B;       # (1)

and the preferred perl5 C<map> syntax is:

   map {...} @a;   # (2)

Then (2) is not grammatically following the same rule as (1).  It works
because there is a rule that says the {...} doesn't need the comma to
separate it from the next arg.

If the rule was, "you can leave the comma out after any argument, no
matter what type", it would be more consistent.  (But a nightmare.)

If the rule was, "you can never leave the comma out", it would be more
consistent.  (But cost one more character.)
If the rule was, "you can leave a comma out either side of a block/closure,
no matter where it appears in the argument list", it would also be more
consistent.

And that's what's being contemplated. Because otherwise, you also have
to have:

	for @list, {...}

	if $condition, {...}

	given $value, {...}

:-(


3) Curly brackets already will have other p6 magic.  I'd rather not add
more if there is any possible way around it.
Without comma-optionality, their other p6 magic will be much less wonderous.


Damian

Reply via email to