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.

I'm not saying the <~ version is going to be any easier to learn, I'm just saying that it offers considerably more language-wide bang for the buck, especially if we're going to adopt stronger OO practices.

On Friday, January 17, 2003, at 11:15 AM, Mark J. Reed wrote:
The fact that a & in a prototype obviates
the following comma is a pretty obscure detail; it's not the sort
of consistent behavior I'd want to build around going forward.

But as I see it, the real problem being solved by the new syntax
is that grep and map can exist solely as methods on some class
in the inheritance tree of @arrays, no global functions required.
That is a Good Thing.
An emphatic yes, on both counts.

MikeL

Reply via email to