LAMP technologies traditionally include Linux, Apache, MySQL, and, by happy coincidence, one of three “P” languages: PHP, Python or Perl. Of course, this is changing a bit. Many folks have long preferred PostgreSQL over MySQL because prior to MySQL 4.1 (or 5, depending upon your point of view), MySQL was pretty much a sophisticated toy, but LAPP probably doesn’t sound as cool. Others prefer Ruby to Python, PHP and Perl, but prior to Rails, many folks assumed that switching to Ruby wouldn’t be a good career move.
But the question that some folks wonder about is whether or not Perl6 will take its place along the “P” languages. The loudest objection I hear today are that Perl6 is taking too long and that it’s too complicated. Well, as anyone who’s programmed C++ can tell you, complexity is not a guaranteed barrier to language adoption. However, while Perl6 is very feature-rich, the common usage of the language is easier to learn than Perl5. As for “taking too long”, were I a betting man, I’d be willing to bet that we’ll have an alpha in 2007, and probably in the first half rather than the second. Given that I’ve been paying attention to Perl6’s development and I know some of the designers and implementors, I feel very comfortable with this prediction. But if Perl6 really is everything the designers hope it will be, why should we bother? Admittedly, I love Perl and its quirks, but I readily concede that those quirks are something of a liability. Not so with Perl6.
What changes will most notice? The dot operator is the biggest change that many will notice:
my $customer = Customer.new; # instead of Customer->new say $customer.name; # instead of Customer->name
Many Perl programmers are unhappy with this change, but let’s face it: the dot operator is the common choice here and that’s because it’s a good choice. Proper Huffman encoding dictates that common things should be shorter and in this case, it’s readily understood by most programmers.
Another big change fixes one of the greatest sources of bugs in Perl5 programs: proper argument lists. Instead of passing everything in the @_ array (”at underscore”? What’s that?), you can do this:
sub foo ($bar, $baz) { ... }
That’s going to save a lot of headaches. Of course, there’s a named argument version:
sub foo ( bar => $bar, baz => $baz ) { ... }
Now many programmers looking at those things might think those amount to little more than bug fixes, but there’s more! Java and C++ programmers sometimes shake their heads in dismay at “dynamically” typed languages. Well, fine. If you want strong typing, you can have it. We’ll even give you multisub and multimethod dispatch. And guess what? You’re also get macros! Real, honest to goodness macros like LISP programmers enjoy, not the broken string substitution thingies which C programmers use. Oh, and you’ll get try/catch blocks, too.
Of course, since we’ll be using the dot operator in OO programming, this begs the question “what’s an object”? Ruby and Smalltalk managed to get this right when they decided that everything should be an object (edit: and that’s how it is in Perl6). Even constants are objects. Something as simply as 7.say will print “7″. Raw lists are even objects:
say ( 1, 2, 4 ).sum; # prints "7" say <1 2 4>.sum; # same thing ( 1, 2, 4 ).sum.say; # this works too
Anyone who’s been programming Java before autoboxing was introduced knows the frustration of working with primitives sprinkled in an OO language (regrettably, the Perl5 autoboxing patch worked wonderfully, but was rejected). Anyone who’s worked with Ruby and Smalltalk long enough knows the joy of the “everything is an object” approach.
Junctions are one feature of Perl6 which I’m sure is going to be snatched up by other languages. Want to know if there are any intersections between two lists?
if any(@first_list) == any(@second_list) { ... }
Or just check to see what a person’s title is:
if $title ne any <manager programmer accountant> { ... }
Traits are another big feature which are slowly gaining traction, but Perl6 will be the first mainstream language to have them included in the core. The simplest way to think of them is like Ruby’s mixins, but method conflicts are usually compile-time failures and have to be explicitly resolved. No more ordering problems!
There’s a heck of a lot more, but those are the major features I’m looking forward to right now. Perl6, which after years of development is probably going to be out within a year or so, not only fixes many Perl5 issues, adds many features that other languages offer and has brand-new features that will just make programmer’s lives more easy. On top of that, from what I’ve seen with the language, it’s even easier to learn than Perl5! It’s definitely going to be a powerful addition to the LAMP toolkit.
Disclaimer: despite being on the Perl Foundation Steering Committee, my Perl6 predictions are strictly my own and not an official statement of TPF or anyone else.


Looks great, I was wondering what would be in Perl6. I like the dot operator better, though coming from PHP I still type -> in Ruby. Thanks
For everyone for whom regex is their primary tongue, that title is great. For those of us who speak English and use regex as one of many programming tools, it's idiotic. I can skim in English. I can't skim in regex. And I'm sure not going to read half the article to figure out if it's relevent to me. I guess the arogance implied in that title is the same arogance that drove the decision to trademark "Web 2.0".
I remember Damian Conway assuring a group of people at YAPC that
Perl6 would be out absolutely no later than late 2001. So call me
still skeptical regarding a release date.
Your title is funny and not arrogant in the lamp context.
It might be a good idea to use the Template Toolkit to be prepared for Perl6. It uses already the dot operator.
Thanks
Tim: actually, I'm "arrogant" (note spelling :) but I don't work for O'Reilly and was as surprised about the "Web 2.0" issue as anyone else.
Dear Anonymous
The difference this time around is that Damian wasn't actually implementing the language himself.
Before Audrey Tang created pugs and really got the process moving, I was very depressed about the delivery date for Perl 6 as well.
But now we are heading towards real code, and there are (literally) dozens of people working on the Perl 6 codebase now, not just a rareified few.
I'm actually willing to counter Ovid's prediction and say I think we'll see an "alpha" (as in some sorts works but major caveats) by the end of 2006 (although very much in the December period).
And that what we'll be seeing in 2007 is more of a feature-complete beta release, although again in the second half of the year.
And because so many people have been working on it for so long in the language areas, what will be released might be a bit clunky but will have the language problems solved.
perl 6 is quite real and you can play with it today
http://debcentral.org/modules/news/article.php?storyid=489
Yes quite pre-alpha stage but the good news is that now is real code that you can learn/improve
http://svn.perl.org/perl6/pugs/trunk/examples/
Also there is now an perl6 users group so yes people actually use it
http://www.nntp.perl.org/group/perl.perl6.users
Funny that only the last two elements of LAMP appear to be variable. I'd rather use FAMP or OAMP than LAMP, personally.
Looking at perl 6 I don't see lots of killer features I desperately need
..but when I am working there are a few I'd like ASAP.
I really look forward to having junctions, and multimethod dispatch and I know our code will be much cleaner using named parameters in functions, and the cleaner OO syntax should mean better designed classes that focus on what the object should provide rather than silly tricks to make perl objects look like C++.
I'm happy with Perl 5 - I use it every day, and for serious infrastructure projects but I'm really looking forward to Perl 6 now - especially as it will open more doors that are currently closed.
Java, PHP and Perl exist because there are still many people that don't want to take the time to pass a weekend learning Python. Come on!. Get a Debian based system and try the command:
# apt-cache python vs apt-cache Java/PHP/Perl/...
The output data is self-explanatory.
In the old 3.x and 4.x days, MySQL was a toy plain and simple. The sophistication was added in version 5.x. Compared to the latest PostgreSQL
even the latest MySQL version feel toy like, especially with respect to speed, where PostgreSQL often are orders of magnitude faster.
My favorite way of doing web applications is using stored procedures for the business logic, php, python, or even perl for the logic needed for the user interface, such as user authentication. For presentation I use some template system such as TAL (available for python, php, java, perl,..)
This way I get applications that are much easier to maintain. The separation between busines logic and presentation makes it easier to ad more personnel to a project in case you are running late. The LAMP model should really be abandoned.
Enrique
Since "apt-cache python" doesn't work i'm guessing you forgot the "search".
Did what you asked:
chrisq@mugabe:~/music$ apt-cache search perl | wc -l
1565
chrisq@mugabe:~/music$ apt-cache search python | wc -l
960
What is your point?
chrisq
"...Perl6 is taking too long and that it's too complicated. Well, as anyone who's programmed C++ can tell you, complexity is not a guaranteed barrier to language adoption."
I have been writing code for many years and have written some very demanding and complex C++ programs. I have also written some pretty complex Perl programs.
I do not find C++ to be a complex language. What it is is a very rich, and almost infinitely flexible language. Ok, there's quite a bit to it and it takes time to learn, but the rules are very clear and precise. Once you know the rules, it is actually very simple. As an aside, I simply do not understand why many people treat C++ as some sort of plague-ridden entity that must be avoided or, as is often the case, crippled by avoiding/banning (!) use of its most useful features.
Perl is also very rich and, like C++, is also almost infinitely flexible. It also takes some time to learn. The big problem with Perl though is that it is NOT coherent. It is NOT simple. What it is a a jumble of ideas thrown together in a seemingly random way, with a syntax so incredibly inconsistent and convoluted it makes one's eyes water (proper function parameters, anyone? - it's not much to ask!). The results are often completely unmaintainable because any one line of Perl contains hidden and almost always cryptic assumptions and side-affects. It has also bloated beyond belief over its lifetime, adding to the chaos. I find Perl to be without a doubt the most frustrating and annoying language ever invented.
I long ago gave up on using Perl for anything I actually wanted to work. For web work, I use PHP. It is MUCH simpler (though I fear the latest version is edging towards Perl-like chaos). PHP is also pretty good for command line scripts too. I would guess that Ruby and Python are equally good (though I've never used Ruby and have only limited Python experience).
"There's more than one way to do it" - in other words, there's usually a better way than using Perl, whatever version it may be.
You never say if everything an object in perl6 or not?
To detailer: whoops, you're right. I hinted that everything was an object, but I never came out and just said it. In Perl6, everything is an object, period. Full classes and introspection will be available for everything.
"I find Perl to be without a doubt the most frustrating and annoying language ever invented."
Rich, first of all: You can only say that about the programming languages that you know of! Which is probably about 1 percent of all programming languages (> 500).
Then: I do not know what this ever rising flame war of C++/Python against C/Perl is about (and I have to say there are more people that are python affine flaming into any direction about perl than the other way around).
Short: Perl does not try to be a perfectly concise logical mathematical engineers' language! It aims to be expressive, and - pardon me - it reached its aim long before Java, Python, Ruby etc. were even born. If you do not want to learn Perl, then don't. If you do not want to learn French, don't as well. But do not try to persuade people that French is a bad language without knowing it truly. Don't with Perl either.
And finally: Perl6 introduces many concepts that are just new for most of the programming languages, and without learning new stuff development dies. So, instead of damning stuff that perl6 does, look at it and tell Guido how and what he can possibly use for Python. I cannot hurt.
Amen
Sorry, I meant: It cannot hurt.
python has the 'in' operator and the 'set' builtin type.
'in' asks containers if they contain the left hand item
if title in ['manager', 'programmer', 'accountant']:
print title
sets are unordered uniqueified lists and support the
operations you would expect (union, intersection, difference)
if set([1,2,3]) & set([7, 8, 9]): # is there an intersection?
print "unlikely!"
Nice title, I will definitely be using that in some future presentations ;) Now if we could only get such a good acronym for AJAX.