--- Michael Lazzaro <[EMAIL PROTECTED]> wrote:
>
> On Friday, January 17, 2003, at 11:00 AM, Simon Cozens wrote:
> > [EMAIL PROTECTED] (Michael Lazzaro) writes:
> >> ...the absence of the commas is what's special. If they were normal
> >> functions/subroutines/methods/whatever, you would need a comma after
> >> the first argument
> >
> > This is plainly untrue. See the "perlsub" documentation, which talks
> > about
> > "creating your own syntax" with the & prototype. You can do all this in
> > Perl 5, and it saddens me that some of the people redesigning Perl
> > don't
> > know what Perl can do.
>
> No. I said it was _special_, not _impossible_. You're "creating your
> own syntax" -- that's exactly my point. C<map>, etc. are using an
> invocation syntax _slightly_ different from the vast majority of other
> cases -- one that skips a comma. Yes, it's a special case that exists
> because of the prototype and the special case caused by '&', which is a
> special case precisely so that there can be *any* way to emulate the
> special case C<map> syntax. But whether we like the perl5 C<map>
> syntax or not, we should at least recognize that it's not regular.
The & syntax is going to be special no matter what. It has the power to turn
a bare block into a subref:
sub foo ($x) { }
sub bar (&x) { }
foo { }; # hash
bar { }; # sub
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com