Mark J. Reed wrote:

On 2003-01-17 at 19:00:04, Simon Cozens wrote:

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.

Well, if even some of the people redesigning the language are
ignorant of some of its capabilities, that is an argument for making
those capabilities easier to discover, and maybe even more intuitive
to use, in the new design.

I see it more as the people who are ignorant of the features of Perl5
should go RTFM (Research The Features that they are Making?)

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.

Why not?  Its a syntax that everyone (or at least, most people)
seem to like.

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.

In your opinion.  I'll still want to be able to write 1-liners and
short scripts.  I'm sure perl6 will still be used for things other
than large applications.  Is it such a sin to want the old syntax?

Even if the definition for grep lives in a method, why couldn't
there also exist a global function that looks like:

sub grep(&code,@array) {
   @array.grep(&code);
}

Or even if this function does not exist, there's nothing stopping
the compiler from simply aliasing:

grep {} @array;

to:

@array.grep({});


Joseph F. Ryan
[EMAIL PROTECTED]

Reply via email to