Perl 6: every concept known to computers is in there
Wayne Folta
wfolta at netmail.to
Fri Feb 20 05:51:28 EST 2004
I hadn't really followed the state of perl for quite a few years. When
Irecently found python, it just suited me and now I've switched. (And
am contributing to an open-source python project. Great fun!)
Someone here mentioned perl 6, so I decided to look in on it and all I
can say is it looks like every concept from every computer course,
article, and book is now included.
I usually like enormous languages, but it looks to me like there's so
much in v6 that language practitioners will separate into
mutually-incomprehensible dialects. For example, subroutine calls have
added 6 or 8 new symbols and feature every possible combination of
subroutine argument variants (positional, keyword, optional, mandatory,
variable-length, etc). Regular expressions have a class-like mechanism
for defining grammars. Regular expressions have been jerked all around
symbol-wise in what looks like a game of musical chairs. (See refs at
end.)
Lots of good ideas that might be interesting to consider for python
(translated into pythonic pentameter, of course). But v6 also reminds
me of the US television standard, NTSC, which some say stands for
"Never Twice The Same Color".
Actually, they've also overhauled their OO model and it looks like
operator overloading is quite nicely done. As an aside, I'm not a fan
of how python maps symbols to names for such things. If you want to
redefine, say, "-" for a set-like operation, you have to either
remember or lookup to see if it's __sub__ or __subtract__ or __minus__
or...
I'd love to see something like:
def "aa - bb":
return [a for a in aa if a not in bb]
(the body may or may not be correct, it's the def that I'm talking
about). This would handle infix, prefix, and suffix all with the same
notation. (Maybe even "circumfix" which I'd never heard used until I
read perl v6's docs.)
http://dev.perl.org/perl6/synopsis/S05.html
http://dev.perl.org/perl6/synopsis/S06.html
More information about the Python-list
mailing list