By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,931 Members | 2,015 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,931 IT Pros & Developers. It's quick & easy.

Perl 6: every concept known to computers is in there

P: n/a
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
Jul 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Wayne Folta wrote:
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.)
I think gramar definitions is a big plus. I program mainly in Python,
but Perl is still my choice for heavy parsing. The fact that regexp are
now named rules is a fact that Perl6 is focusing on what Perl is doing
better: parsing. Personally, I would prefer Perl to Lex/Yacc.
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.)


I prefer the statu quo. It's an even more flexible syntax since you can
do more that syntax overloading. An how would you get a reference to
that function without a name?

Regards,

Nicolas
Jul 18 '05 #2

P: n/a
Wayne Folta <wf****@netmail.to> wrote in message news:<ma*************************************@pyth on.org>...
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.


But this is not a positive thing.
For example i love eiffel because it only has one loop construct.
You can write a song with 10000 notes but normally it will not sound good.
Jul 18 '05 #3

P: n/a
>> 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.
But this is not a positive thing.


I agree mostly.
For example i love eiffel because it only has one loop construct.
You can write a song with 10000 notes but normally it will not sound
good.


But a song with only one note isn't much to listen to, either. (A song
with two chords, however, is called a heavy metal hit.)

Eiffel may only have one loop construct, but I'm sure you will find
many idioms that people use to create the kinds of loops they need in
practice. Things can be too simple or too complex.

I do think that perl 6 has so much stuff in it that skilled perl
programmers will not be able to understand each other's code because
they can only use subset of the language. Still, it's certainly
fascinating to watch. Even inspiring in some sense, though I'll
continue with python.
Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.