Larry Wall on Perl 6
Nate writes "Linux Format magazine has an interview with Larry Wall, the eccentric linguist and coder behind Perl. Larry discusses some of the new Perl 6 features ready to rock the world, and if you're not planning to move from Perl 5.8, he has a few musings on that too."
"For the full interview, in which Larry discusses more about O'Reilly and the upcoming Perl 6, grab a copy of LXF 75."
Annoying.
R
Homer: Facts are meaningless, you can use facts to prove anything that's remotely true!
Larry Wall (b. September 27, 1954), programmer, linguist, author, is most widely known for his creation of the Perl programming language in 1987. Wall earned his bachelor's degree from Seattle Pacific University in 1976.
Wall is the author of the rn Usenet software and the nearly universally used patch. He has won the International Obfuscated C Code Contest twice and was the recipient of the first Free Software Foundation's award for the Advancement of Free Software in 1998.
Beyond his technical skills, Wall is known for his wit and often ironic sense of humor, which he displays in the comments to his source code or on Usenet. For example: "We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise."
Larry Wall is a trained linguist, and has used this training in the design of Perl. He is the co-author of Programming Perl (often referred to as the Camel Book), which is the definitive resource for Perl programmers. He has edited the Perl Cookbook. His books were published by O'Reilly.
Wall's Christian faith has informed some of the terminology of Perl, such as the name itself, a biblical reference to the "Pearl of great price" (Matthew 13:46). Similar references are the function names bless and confess and the organization of his talks into categories such as apocalypse and exegesis. Wall has also alluded to his faith when he has spoken at conferences, including a rather straightforward statement of his beliefs at the August, 1997 Perl Conference and a discussion of Pilgrim's Progress at the YAPC (Yet Another Perl Conference) in June, 2000.
Wall continues to oversee further development of Perl and serves as the Benevolent Dictator for Life of the Perl project. His role in Perl is best conveyed by the so-called 2 Rules, taken from the official Perl documentation:
1. Larry is always by definition right about how Perl should behave. This means he has final veto power on the core functionality.
2. Larry is allowed to change his mind about any matter at a later date,regardless of whether he previously invoked Rule 1.
Got that? Larry is always right, even when he was wrong.
Larry's personal home page
Larry Wall wiki quotes
"If anyone needs me, I'm in the angry dome."
Monday, December 19, 2005 - 11:39 AM, (135 Reads)
In issue 75 of Linux Format, on the shelves now, we have an interview with Perl king Larry Wall. Here are a few of the questions we asked Larry, along with his answers:
LXF: Did you leave O'Reilly after the dotcom boom was ending, when people stopped buying books so much?
Larry Wall: O'Reilly had run into really tough times because of the plunge in book sales, which was already starting before 9/11 but very much accelerated at that point. So I knew that I was... that I was one of their fluffier employees from a standpoint of their core business, so I was not at all surprised to get laid off. People sometimes say, "Well aren't you angry at Tim O'Reilly for laying you off?" and I say, "No, you don't understand."
The years that he hired me he essentially paid me to do what I want to do. He essentially gave me a scholarship for those years, and I'm completely grateful for that, for what he was able to do, and so that's my feeling about Tim O'Reilly. I'm on very good terms with him.
LXF: What do you find particularly excites you about Perl 6 - apart from the idea of finishing it!
LW: I think it would have to be the parts that are designed to evolve faster even than Perl 5 could evolve. Perl has always been somewhat about evolvability. That's partly why we have sigils [$, @, %] on the front of our variables, so they are often in separate name spaces from the verbs. And we added a lot of extensibility to Perl 5, which was why we ended up with the CPAN, which is the envy of all the other languages.
Nevertheless, there were many ways in which Perl 5 was running into its limits, and these were both syntactic limits and semantic limits. We had ways of mutating the language, but only very crudely. We had a mechanism called source filters, but the trouble is that the granularity was far too large, because it was from here to the end of the script. You could filter through a filter, and that meant that every source filter had to reparse Perl to do anything with it. You couldn't stack them, because they would interfere with each other.
In Perl 6 we actually give the programmer control over the individual grammar rules and even sub-rules, so that you can replace little bits and pieces of the grammar. It's a kind of encapsulation, in the sense that you're only changing the parts that you are concerned about in a way that does not influence the rest of the grammar. This lets different kinds of grammatical mutability sneak into the language, and lets people experiment with different syntaxes and different ways of attaching those syntaxes to new kinds of semantics. And then we can have a lovely Darwinian gene pool that will pick the winners and also pick the losers, and that will contribute to the evolvability of Perl 6.
Part of the new evolvability design is the notion that we need better control over interface versions, so that different modules can for instance have requirements on other modules, and if two modules require the same module but happen to require different versions of that module, those can both coexist. Unless of course those two modules require some kind of exclusive access to a resource that cannot be shared. They'll have to negotiate then.
When I say, "Use module::dog" I get Fido version 1 and when he says "Use module::dog" he gets Fido version 2. But in either case a lexically scoped alias of dog means this in my particular case. And beyond that, perhaps [we can] even provide mechanisms so that modules themselves can be polymorphic with respect to their own version numbers. So you can say, "Yes, I know I'm pulling in version 2 but I know that you know how to emulate version 1. And I have to stick with version 1. Or maybe that's implicit: you say: " I want version 1, you might get version 1 or you might get version 2 emulating version 1". So we allow modules to then mutate their interface and their set of semantics over time, and yet have a way to identify a certain set of semantics that can be locked
Gentlemen, the time has come for a serious discussion on whether or
not to continue using Perl for serious programming projects. As I will
explain, I feel that Perl needs to be retired, much the same way that
Fortran, Cobol and C have been. Furthermore, allow me to be so bold
as to suggest a superior replacement to this outdated language.
To give you a little background on this subject, I was recently asked
to develop a client/server project on a Unix platform for a Fortune
500 company. While I've never coded in Perl before I have coded in VB for
fifteen years, and in Java for over ten, I was stunned to see how
poorly Perl fared compared to these two, more low-level languages.
Perl's biggest difficulty, as we all know, is the fact that it is by far
one of the slowest languages in existance, especially when compared to
more modern languages such as Java and C#. Although the reasons for
this are varied, the main reasons seems to be the way Perl requires a
programmer to laboriously work with chunks of memory.
Requiring a programmer to manipulate blocks of memory is a tedious way
to program. This was satisfactory back in the early days of coding,
but then again, so were punchcards. By using what are called
"pointers" a Perl programmer is basically requiring the computer to do
three sets of work rather than one. The first time requires the
computer to duplicate whatever is stored in the memory space "pointed
to" by the pointer. The second time requires it to perform the needed
operation on this space. Finally the computer must delete the
duplicate set and set the values of the original accordingly.
Clearly this is a horrendous use of resources and the chief reason why
Perl is so slow. When one looks at a more modern (and a more serious)
programming language like Java, C# or - even better - Visual Basic
that lacks such archaic coding styles, one will also note a serious
speed increase over Perl.
So what does this mean for the programming community? I think clearly
that Perl needs to be abandonded. There are two candidates that would be
a suitable replacement for it. Those are Java and Visual Basic.
Having programmed in both for many years, I believe that VB has the
edge. Not only is it slightly faster than Java its also much easier to
code in. I found Perl to be confusing, frightening and intimidating with
its non-GUI-based coding style. Furthermore, I like to see the source
code of the projects I work with. Java's source seems to be under the
monopolistic thumb of Sun much the way that GCC is obscured from us by
the marketing people at the FSF. Microsoft's "shared source" under
which Visual Basic is released definately seems to be the most fair
and reasonable of all the licenses in existance, with none of the
harsh restrictions of the BSD license. It also lacks the GPLs
requirement that anything coded with its tools becomes property of the
FSF.
I hope to see a switch from Perl to VB very soon. I've already spoken
with various luminaries in the Perl coding world and most are eager to
begin to transition. Having just gotten off the phone with Mr. Alan
Cox, I can say that he is quite thrilled with the speed increases that
will occur when the Linux kernel is completely rewritten in Visual
Basic. Richard Stallman plans to support this, and hopes that the
great Swede himself, Linux Torvaldis, won't object to renaming Linux
to VB/Linux. Although not a Perl coder himself, I'm told that Slashdot's
very own Admiral Taco will support this on his web site. Finally,
Dennis Ritchie is excited about the switch!
Thank you for your time. Happy coding.
The virtual machine that will run Perl 6 is Parrot, an innovative register-based JITed VM optimized for dynamic languages.
It can also run a subset of Python (compiled with Pirate), Ruby, Tcl, brainf*ck, Ook!, Common LISP, BASIC, Lua, m4 and a few others, all of which are more or less incomplete.
More details on the Parrot site and the Wikipedia page on the Parrot VM.
If you like that sort of things, you can help!
There's a hidden treasure in Python 3.x: __prepare__()
TFI (I=interview) for once before I wrote about it, but the page says
"For the full interview, in which Larry discusses more about O'Reilly and the upcoming Perl 6, grab a copy of LXF 75.".....
Karma: Bad (but who really cares anyway?)
So what's he doing after O'Reilly?
I figured he was there for life, especially now that the dotcom bust seems to be un-busting again.
D
George W. Bush was second, though.
Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
I like that.
The simple truth is that interstellar distances will not fit into the human imagination
- Douglas Adams
Sure, some fanboy is going to mod me as a troll or what have you, but the fact is that perl is well past its sell by date. And, not without reason. While it, like anything, can be useful under the right circumstances, the fact is that Perl syntax is laborious and inconsistent, to say the least. Hard as this may seem to believe, the world has moved on to the conclusion that programming languages should be EASY to read and run FAST, not HARD to read and run slow. Or, at the very least, EASY to read and run SLOW is good enough in some circumstances to.
I have absolutely no doubt that perl is comfortable to the few of you who still use it daily. The rest of us simply recognize that it's an awkward language by gauging the amazingly short time period between having to look up THE SAME BASIC THINGS over and over again. Basically, perl is like Emacs or the CLI: it's a cult.
Chop() belongs on the scrap heap of history with malloc(), as far as simple end-user-focused programs go.
I'm not going to debate the fact that Perl is an immensely powerful language. It can do an amazing amount of stuff...but I'm worried about giving the programmer control over the actual grammar of the language itself. It seems that that will cause some of the same issues that C macros can cause (which is why Java doesn't include them), in terms of making the code just next to impossible to follow. Perl is hard enough to maintain with how obfuscated it can get. I'm not sure this is going to help.
O'Reilly had run into really tough times because of the plunge in book sales, which was already starting before 9/11 but very much accelerated at that point.
I remember on 9/11 thinking: That's it, I will never buy any more books! The terrorists have won.
He who knows best knows how little he knows. - Thomas Jefferson
Whilst I agree with you generally, why did you consider the CLI to be 'a cult'? And to which CLI do you refer? Bash has its deficiencies and irregular syntax, but I don't know of anything better. Do you?
For as long as I've been following Perl 6, I've felt Parrot is more interesting than Perl 6 itself. Parrot is in many ways like .net (obviously there are many internal differences, but the idea is the same). Compile to a common bytecode that a virtual machine understands. This is interesting because it already supports (albeit incompletely) more languages than .Net and is a whole hell of a lot newer. I think Parrot is going to get the attention of a great chunk of languages haven't really considered using a VM before. We could see the age of 3 common bytecodes in practice. Java VM (whatever it's called), .Net, and Parrot. Maybe one day instead of seeing "Ruby 1.8 or greater required" we'll see "Parrot X.X or greater required". It'd be nice if we actually saw the day of the Parrot VM browser plugin or (pipedream) Windows coming with the parrot VM.
If an officer ever threatens to taze you, say you have a pacemaker.
Chop() belongs on the scrap heap of history with malloc(), as far as simple end-user-focused programs go.
...this is why it was replaced with chomp().
/me ducks
www.wavefront-av.com
Blah, blah, blah. I hear Perl is a write-only language, too. And that it looks like executable line noise. And it's well past its prime and no one uses it any more. Python, blah blah, Ruby on Rails blah blah blah. Is there some sort of script that automatically makes this post whenever the word "Perl" appears in a Slashdot headline? Yeah, and that script is probably written in Perl.
--I'm so big, my sig has its own sig.
-- See?
Translation: "Perl 6 code will be the most unreadable Perl ever."
Rich And Stupid is not so bad as Working For Rich And Stupid.
In Perl 6 we actually give the programmer control over the individual grammar rules and even sub-rules, so that you can replace little bits and pieces of the grammar.
Cool! Perl 6 code is even less readable.
But I think everyone knows that already. :)
The dead tree version had on the cover a very Larryish
quote - (roughly) We have 80% of Perl6 done and we are now working on the next 80%.
I do think you should take a look at the web pages your looking at. as far as i can tell, the .pl at the end of the page name means it's written in perl. So, is slashdot written in perl? i think so.
"In a world without walls and fences, who needs Windows and Gates?"
I have found Perl to the easiest language to both learn and use. Its syntax is logical and not difficult to grasp in my opinion.
As far as being slow, it is probably similar to other VM languages in speed, such as Java or Python. Furthermore, Parrot will provide a JIT/AIT Just in time/ahead of time compiler which allows code to be natively executed on the CPU.
Nobody is forcing you to use Perl, whatever version. I don't complain about your Java or .Net stuff, even though I think it sucks. Perl was, and for it still is, the best scripting language around for a long time. Faster and more complete than anything else in 95 or so. Me, I hate obligatory indentation (aka meaningfull whitespace !?!?!) and I am also not fond of a programming language which tries to tell me what the hell I can and cannot do (like Pascal or Java).
;-)) is written in C (where it is not assembler), as well as the complete toolchain (again, where it is not assembler). Including (parts of) your java compiler and your .net interpreter.
.net whatever is faster than C, regardless, try rewriting any of the Obfuscated C contest entries of any year in Java, and benchmark both. Especially those that deal with graphics. You like to have fun, don't you?
Now, for some less educated ppl, Perl does have some pointer-LIKE stuff (references), but you do _NOT_ do explicit memory management like in C. And for the complete morons out here, if you think C is retired, think again. Your favourite OS (_ALL_ of them; well, except Newton and some other exotic ones, but those are from before your time.
Now, if you _really_ think java or
Rewrite of Perl has been in the works longer than most would like to rememer. I find it hard to believe it will ever be adopted over perl5.
In a world with Java and Ruby, who needs Walls and Van Rossums?
Shame on Google.
No no no. Having looked up the meaning of the .pl subscript and examined the quality of the English grammar exhibited by the editors, I'm fairly certain it means that slashdot is being operated from Poland.
Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
Larry Wall is developing the USELESS Language that nobody uses it!!! hahahaha!!!, he's a PIG developing a dead language!!!.
99.99% of people doesn't develop software in Perl, so, nobody will develop Parrot for the awful Perl, hahahaha.
Sure! Perl! :)
Yes. The fish.
Try out fish, the friendly interactive shell.
You don't have a high user ID, so you should know that it's considered whoring to copy/paste stuff like that.
> Whilst I agree with you generally, why did you consider the CLI to be 'a cult'?
> And to which CLI do you refer? Bash has its deficiencies and irregular syntax,
> but I don't know of anything better. Do you?
For an interactive CLI, there's a lot to be said for eshell.
And for writing "shell" scripts, Perl is an obvious choice.
Cut that out, or I will ship you to Norilsk in a box.
I think one of the strength of Perl is a very active community and, dare I say it, they are nice bunch of people.
I have been to two Perl YAPC and found the people very helpful and very welcoming to people with limited programming background like myself.
The other big strength of Perl is CPAN, it's like a huge store for free. I used the CPAN shell a lot at one point and I was very pleased in the way it resolved dependencies. IN general I found the documentation for the CPAN Libraries I was using very good. Your mileage may vary. Sitll I found that creating your own Classes is a bit more work than in some other languages.
I worked on a big project that was pretty much all in Perl. How did they do it? Good old fashion project discipline. They set coding style rules (programming and indentation), Perl's Perldoc for documenting, good versioning, and object naming conventions.
You, sir, deserve a "+5 Stimulating"! By the way, I am holding my penis in my right hand as I type to you with my left.
Larry Wall is eccentric?
Then I must be loony as a kookaburra.
I hear this assertion cropping up all the time -- "Larry wall, a linguist", "with a background in linguistics", "a trained linguist" -- but haven't been able to research this further. So perhaps a fellow /.er can shed light on this question:
Where did he receive his training in linguistics? What was this training about, what did he specialize in? Does he hold a degree in linguistics? Does he have any peer-reviewed publications on linguistics?
I'm asking because this is mentioned nowhere. The university he calls his alma mater on his home page (Seattle Pacific University) offers courses in linguistics (in the College of Arts and Sciences, Forein Languages and Literature department), but it seems to be offered as a minor subject, not as a major.
So: Why does Larry Wall call himself a linguist?
Thanks for helping with this question.
Regards, Felix.
Larry Wall has announced plans to hardwire Perl 6 into his brain to make it easier for him to do updates in the shower.
GetOuttaMySpace - The Anti-Social Network
Your experience must all be in a zoo of monkees. I work for a fortune 25 company with over 200K employees and we use everything. Its very odd that my experience is the exact opposite of yours - VB is a joke, no elaboration needed. And Java is the most UN-productive, cludge/rube-goldberg, resource sucking, pile of crap language there ever was. The fact is people only use Java because of the pay scale for it - period. If you are interesting in getting the job done and doing it well, you use Perl. Its faster that Java too - to buck the myth.
As far as being slow, it is probably similar to other VM languages in speed, such as Java or Python.
You're probably right, now the real question is: Java or Python.
Million Dollar Screenshot
It looks pretty interesting. Can you enlighten me on its Unicode support (or lack thereof)? Does it get confused when running in UTF-8, or when using CJK characters? Can it count columns properly when there are "wide" characters on the line or in the prompt?
Prescriptive grammar:linguistics
I am planning to move from Perl 5.8; in fact, I have already mostly moved: to Python and to PHP5. I use Perl only for a few legacy scripts on Linux and for some Windows admin stuff.
Perl was a great advance over shell+awk when it came out, but I can say now: Perl has served its purpose and I'm not sad to retire it.
better than bash? sure, there's zsh. mostly compatible, too. bash might have caught up in these years though...
...! The biggest fear a Java programmer has is that management will find out that their inflated salaries are not worth it in terms of productivity nor quality. Its funny to see all the Java programmers attack Perl like vultures. Question to the Java zealots: Why are you so threatened by Perl and all other languages? If Java is so truly the top language of "choice", why do java programmers waste no time in attacking every other language out there?
Word of advice: Java is India. If you are on a project that uses Java then you are going to loose your job when its farmed out to India. That's a fact. Quit living in fear of Perl and all other languages and round out your resume by "learning" something on your own, not just force fed to you by a college instructor while you slept in class with a hang-over.
Bashing Perl is like bashing democracy. Perl is a great language and it doesn't get old. Get over it and get a life, Java zealots.
It would be much better for the communities to have Larry talk about PHP and maybe Rasmus provide his thoughts about Perl.
At least we'd get an interesting cross-flame session!
Maybe Computers will never be as intelligent as Humans.
For sure they won't ever become so stupid. [VR-1988]
Who's using Perl 6 for a serious project? And what is the project? More than a 1000 self-written lines, no comments (as if you r would...) or white space (ditto)?
Patriotism is a virtue of the vicious
Perl is compiled every time you run a Perl program. It causes an annoying slowdown in my programs.
It doesn't have to be... you should look into SpeedyCGI/PersistentPerl or even PPerl. I use the former for various web cgi's that are hit constantly (including one framework where all hits are rewritten to execute a single index.pl script) as well as for various scripts that need to execute very quickly as part of a qmail/vpopmail shell chain.
As long as it's already use strict compliant, neither of these options require any changes to your code (unlike mod_perl), but should give you a significant increase in speed... for exactly the reason you specified.
In fact, when you remove compilation from the equation, I've seen well-written perl code that executes faster than almost any other language... (your opcodes are basically boiling down to C anyway).
Of course for CGI-only usage you can use mod_perl, but that does bring in some added complexity. The solutions above work from the command line as well, and require nothing more than a shebang line change.
Hire a Linux system administrator, systems engineer,
...that he favors the "cathedral" model.
Perl--APL for a new generation of dyslexics!
I used chop() just the other day. Needed to remove the last character of a string, that is what chop() is for.
OK, I'm a computational biologist by profession, so it goes without saying that I use gobs of Perl. I also use gobs of PHP, Java, R, Python, and to a lesser extent C++ and C.
.Net has some serious competition) and the greatly improved performance, but more importantly the language features allow grammars and rules for natural language processing in a very clean and efficient style. I've a number of projects analyzing literature where this would be a boon and there's nothing comparable in other general purpose languages...
I end up using all of those languages of course, because all of them have their strengths and weaknesses. Perl is not the best performer, but much of my work is working ad hoc problems and Perl is very simple and concise for many common problems. It also is a great alternative to shell programming. I love it for those things.
However, I hate writing web-based stuff in Perl because the ease of use and clarity (basically speed of me getting somethign done tempered by the chance that I can figure out what I did later when I need to) are not as high as, say, when using PHP. It pains me to see awfully written Perl code when thigns could more clearly and easily be solved using something else -- in which case I hate it. I frequently get legacy stuff that is over engineered or fanatastically complicated because someone didn't recognize or didn't know how to use something that would have been simpler; doubly an issue since this also tends to produce more opportunities for bugs.
I could go on, but I've been doing this for some time now and have a very good feel for which language is the best tool for a specific aspect of my job and I use that (because the language used to implement a solution is NEVER a concern for those whom I'm providing solutions to).
I'm really interested in Perl6 -- the new VM (looks like
Does anyone know if programming actually started in 2000 for this? It seems like Perl 6 has been in development for forever.
That is the way I feel about the MySQL posts that are present in every MySQL thread present on Slashdot. Only listing the reasons it sucks, nothing representing how popular it is regardless of these suck-alicious reasons.
A Programming Language, APL was easy to understand. If you needed to modify code, it was easier to rewrite if from scratch. It was a write-once language.
x=%$^3(6+=)45/7*4!
Answer x=89
It's easy to understand, just like Perl. Seriously, I wrote an entire database application for a diabetes research project in just 75 lines, it equalled any gigabyte Windows app.
as far as i can tell, the .pl at the end of the page name means it's written in perl.
Or prolog.
-30-
Here's something I've been wondering about Parrot for a while. How will extensions work? How can I extend Parrot-based languages with C, either to optimize an algorithm, or to wrap a C library?
In my opinion, Parrot needs to get this right to be useful.
Not me. I migrated (to Ruby) after years of using Perl because Perl's syntax is so horrible and complicated that I never managed to learn a lot of the important features I knew Perl had--like the ability to do object-oriented programming.
Ruby has much simpler syntax and scoping. That means it gets out of the way and lets me write code. I know that everything I write could be done in Perl, and I don't care.
I also know that Perl has things Ruby lacks. But they're things I don't need that just make the language uglier and more complicated. I don't need three or four different ways to pass parameters to a function. There's a point at which "There's more than one way to do it" becomes pathological and bad for the language. It became clear from Larry's writings that Perl 6 was going to have even more syntactic complexity, so I decided it was time to leave.
GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
why did you consider the CLI to be 'a cult'?
Because he's probably a clicky-widget M$ admin who doesn't understand the power of a straightforward, low-level *programmatic* interface to everything on the system. Nothing to see, move along.
We have more to fear from the bungling of the incompetent than from the machinations of the wicked.
So when does Perl 6 comes?
And which will come first, Duke Nukem Forever or Perl 6?
Nevertheless, there were many ways in which Perl 5 was running into its limits, and these were both syntactic limits and semantic limits.
This is so misguided. I take this to mean that Perl6 syntax will be even more of a carnival of confusion than Perl5. Will Perl6 replace sendmail.cf as the most vile grammer yet devised? Maybe, but more likely it is so complex that it will never be released. Can you say Hurd?
an ill wind that blows no good
When you are going to serve up a fat, slow pitch right across the plate, how can you not follow up and knock it out of the park?
s/eccentric/cunning/Duh.
Not A Sig
You know, if you're going to steal an article, verbatim, from wikipedia.org, the least you could do is cite a reference to it.
But in the future, maybe you should just post a link to the article instead.
-1, Plagiarised for you.
I currently have no clever signature witicism to add here.
"We're not terribly interested in telling people what they can't do."
I looked but could not find it
Bill G
Right now to try to save themselves most Publishers are just attempting to do the same thing by making superficial changes in how books look and selling this facelift as the next big thing ("Head First Java" anyone?).
I've been buying, reading, using O'Reilly Books for almost 10 years now. If I need to buy 'blind', I buy O'Reilly and only have been disappointed once (their MySQL/mSQL DG sucks). I was disappointed when I saw them leaving the Animal Rule with the Head First series.
Then I looked into "Head First Java" and "Head First Design Patterns". And bought them right away. I must say that the "Head First" Line takes the O'Reilly fullfilment of quality to a whole new level. These books are absolutely awesome and would have saved me *years* of grocking the concepts of OO and Patterns, if they only had been there earlier.
Why there is some stuff that looks like O'Reilly jumping on the lesser quality "Dummy" type of textbook with some current german titels in order to up the throughput that is absolutely not the case with the "Head First" series. They are by far the best guided training books ever and truly redefine that type of book.
We suffer more in our imagination than in reality. - Seneca
My take on it is that it's a pretty transparent situation--what he really wanted to be was a missionary linguist, and he never got to be that, but it's still important enough to his self-identity that he mentions it left and right. I find the whole thing a little bit dodgy, but way less so than ESR's practice of calling himself an "anthropologist" (or more precisely, "an observer-participant anthropologist in the Internet hacker culture"), which in his case I think most accurately translates as "a fraud."
Anyway, here's the lesson, kids: calling yourself fancy titles that other people haven't given you tends to mess up your reputation among those in the know.
Are you adequate?
Most people that malign Perl simply are not able to understand it's power - not the expressiveness of it's syntax (which takes no time to master), but the expressiveness of the language itself.
Some unmatched strengths:
Support of multiple paradigms, object-oriented and functional
Duck typing
Ability to mix data and code (A travesty like Java annotations is simply and consistently expressed in Perl)
If you don't understand why these are invaluable, then in my opinion you are a garden-variety vocational programmer.
All you need are lists and functions as first class objects.
I've had enough of tools that optimize the first 10% of the learning curve to get a gentle curve, but plateau with a much higher ongoing cost for the other 90% of its lifetime...
I'm willing to put in the effort of a steep learning curve to get a better tool for the 90% I spend so much time in.
I used to hate it, but now grudgingly think it's ok, I've used it for work for the last 6 months.
/has/ bitten me a couple times.
But, I've definitely had problems because of the indentation. Add or remove an if or a loop, and, if your code is complex, it's easy to miss-indent, and of course, it matters. Plus, don't get me started on the very few places Python allows breaking a statement across lines (c'mon, the interpreter can't see a trailing '.' as a hint that it needs to keep going?).
Luckily as I've started programming more functionally (thus compactly, & with more parentheses & fewer ifs & loops) the indentation problem has pretty much gone away, but it
Someday we'll all be negroes
Isn't ruby the modern successor to perl and not perl 6? Why will perl 6 be better?
... anyhow when you are done you find there are more than in perl. Worse they are used ambiguously unlike in perl. For example the use of [] in perl only means an array lookup and someone reading the code can tell this. Not true in python. Likewise for () and ',' which have both passive uses as separators and active uses as gramatical modifiers. IN perl these have one meaning.
.get() has defaults added to it) things get complicated and less clean.
.rtrim for example). Ruby solve this nicely in a perlish fashion by introducing the character ! to differentiate in-place and r-value operations. .get() with a default actually evaluates the default value if it's a function rather than short circuiting it. On the other hand the "or" function does short circuit the evaluation when the right hand term will not be used.
I'd also like to take a pot shot at python. My feeling about python is that python is a much better programming language than perl for SOPHISTICATED programs. But in general perl is actually a more cleverly conceived langauge with far more available power. Many of the criticism people lay on perl in comparing it to python are either naive or an artifact of python's youth and thus lack of cruft. The latter is changing as python matures.
Here's examples of what I mean by naive criticisms: Two things I think standard newbie criticism of python and perl get exactly wrong are whitespace and variable prefixes ($@%#\).
Pythns white space it truly annoying at first. Then you begin to see why it's such a fantastic innovation. Sure every good program has a good set of indenting rules. The trouble is despite being good, they are different. It's hard to read someone elses code with precision. With python, everyone follows the exact same rules. I can easily scan any code I find and follow the scopes, even across pages on the screen. It's truly effective in practice and one of the best things about the language.
Perl is said to rely too heavily on symbols like $,%,@ that coders think are unnessecary and dispensed with in python. Wrong. If you actually do the count you will find that python has more special gramatical signals than python! really, try counts. lets see just to name a few there's : and () and [] and {} and @ and 'r' and ','
In perl I can visually distinguish verbs and nouns (functions, commands and variables) by their clear prefix declarations.
Part of pythons cleanlyness comes from syntactic sugar. but under the hood it's objects are implemented the same way that perl's objects are: hashes (dir dict) or pseudo-hashes(slots) are
and part of it's cleanliness comes form missing functionality: for example: references in perl that are lacking in python. e.g.
for $i (@e) { $i +=1 } # $i is a pointer into @e's memory
for i in e: i = i+1 # this code does nothing at all since i is not a pointer.
As python matures and more and more idiomatic expressions enter (like generators expressions, or list iterators) or hash methods get extended (
Perl has be criticized on this account since some of it's functions canvary depending on how they are called (e.g. split), and you have to memorize the forms. but as python iterates these same inconsistencies creep into it.
for example, some things in python produce R-values and some do not but you can't know except by memorization (.sort and
In python sometimes things are short circuit expressions and sometimes they are not. for example
So anyhow I'm not saying python is a bad language. I use it and love it. I'm saying that it gets a bad rap from people who can't think in perl. So don't flame me on that account.
Ruby seems so clean up the complains people have about perl while preserving it's advantages over python. so why do we need perl 6?
Some drink at the fountain of knowledge. Others just gargle.
I'm not sure if it's ironic or just odd that I can't get that page to load correctly on firefox, while ie handles it like it should
When Perl6 was defined and Larry ask developers about their wishes, one wish was Perl version should never pass 2*Pi Amazing when you look now at the reluctance how developers switch to Perl6 and still stick with Perl5.x Larry might fulfill this wish in a way nobody expected. O. Wyss
See http://wyoguide.sf.net/papers/Cross-platform.html
The scariest part is, Windows Vista is supposed to expose a bunch of new interfaces in its new command shell (MSH). What will all those MS admins do, then?
GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
My own experience with perl is that most users never use the functionality that's readily available in the "first 10%" of a simpler language like Python. If and when they make the effort to do something complicated in perl, it has a clunky, bolted-on feel and therefore is not quite equivalent to perl's alternatives. (OO programming is one example.) I think perl tries to do too many things beyond being the best "unix chainsaw," does few of them well. I like a lot of things about perl but I am reluctant to invest to much time in a language that seems to be morphing out of control with creeping featurism.
[duck and cover]
That's because the postgres users have nothing better to do
[/duck and cover]
Why UNIX?
Perl 6 has got to be the vaporiest vaporware out there, almost. The development on this thing has been going on forever. Six really is going to be the horse developed by committee. How much of the stuff in there was cool back in '00 really matters now?
It's a good, on topic question. Why is ruby not the successor to perl 5.8? The digression about python versus perl points out how ruby resolves syntax problems in python (another perl replacement) by exploiting rather than rejecting perl's rich syntax. What does perl6 offer that the extensions of perl to create ruby lacks . The person who moderated this to troll is an imbecile.
right?
Fewer components is not necssarily better.
I prefer a tool which best matches my problem domain. If the domain is complex, the tool should be complex.
The rapidity and severity with which comments get moderated as "flamebait" seems to be proportional to how threatened a community feels.
And Perl has good reason to feel threatened: half a dozen excellent new scripting language, a radically different new version of the language, and a much delayed new implementation.
I think the moderators supported my point: there are better choices than Perl these days, and even the most die-hard Perl zealots know it.
The rest of us simply recognize that it's an awkward language by gauging the amazingly short time period between having to look up THE SAME BASIC THINGS over and over again. Basically,
At the risk of feeding a troll, I will defend Perl here.
It's all a matter of the right tool for the right job. Remember, Perl is Practical Extraction and Report Language. When I need to Extract data from a logfile and turn it into a Report, Nothing does it faster than Perl.
A key to Perl is the PRACTICAL part. Perl has no pretentions about changing the way we think about programming, it is a down to earth "just make it work" kind of language.
In spite of the above, Perl actually is a fairly radical experiment in computer languages. Unlike more formal languages, it seeks to be a colloquial and informal language much like spoken language. A natural result is that there are many 'dialects' of Perl spoken (unlike dialects in formal languages, these are all supported by the same implementation), many idioms, and a great deal of slang. Ideas can be expressed very formally in Perl using language analogous to the "flavor" of human language that might be used in official documents. They can also be expressed in "street slang" analogous to the near gibberish (to the unititiated) of text messaging.
The later readability of Perl code is similar. Formal documents can be read fairly easily decades later. Slang filled street dialects may be incomprehensable to many even as it's being written.
Looking at Larry's CV, it's not too surprising he might try a language like this :-) I think it's an interesting experiment, and judging by the amount of Perl code out there, it seems fairly successful.
You did a nice job listing out the negatives.
.Net programmers have to look up stuff from their libraries. I'm not sure what the problem is.
Weakly typed (Please don't confuse this with dynamically typed).
It depends if you include the object model here. Objects aren't strongly typed they are just hashes, and hashes. If you don't include it then things case pretty well. All assignments work and everything is polymorphic with a sane default.
Defines behaviour in weird and even incorrect ways, or in other words: blissfully ignores undefined behaviours ("Hello world" + 5).
How is that a problem. "Hello World" can't be the string forum for any number. So it evaluates to 0 and the above is simply the integer 5. On the other hand "3"+5 = 8, and "3.2" +5 = 8.2. That's very useful polymorphism in my book.
Has hundreds of operators to remember (Part of the reason Perl developers need to walk around with the Perl manual in their pockets..)
Perl programmers do weird stuff to string a lot. The operators are a very complex string library.
Has no proper exceptions and exception handling (And even uses return codes and "exceptions" interchangably to handle errors)
Not true. It has the "eval" syntax for exception handling. Also since it can build statements on the fly you end up with exception handling more like LISP's model. Certainly way more complicated than C but way more powerful.
Lacks formal argument naming (Making automatic documentation generators much more difficult, as well as reflection lacking).
Awful division of the world into scalars and other types, resulting in the use of references to place some types of objects in hashes. In some cases, these references are not even properly ref-counted, and Perl's garbage collector incorrectly frees the objects prematurely (Please tell me this was fixed, I may be out of date about this one).
That's getting fixed in Perl 6. Agreed.
Awful syntax (but you mentioned that already)...
Be specific.
Generally putting value on the flexibility of how the program can look, rather than on readability, making the computer or human parser go through grammar forests (now extensible, yay) in order to read them.
Sure. Perl is much closer to Lisp than fortran. Its designed to allow you to express your conception of the program as more than just a list of steps. To read a Perl program is to understand the way the author conceives of the program not how the program works.
A year ago, a friend asked me to help write a web page for her softball league, to track team rosters, etc. Having done a couple of web pages in Perl, and with about 10 years of Perl experience, it was my first thought. However, I'd been hearing a lot about PHP. So I read a PHP book and did a bit of experimenting.
To my mind, PHP is "Perl Lite". Yes, its nice to embed functionality directly in the page. But PHP is far too watered down in capabilities, and lacks CPAN. If you want markup functionality, give Template Toolkit a try. If you don't like TT, try Mason. Unless you want a canned Wiki that's easy to customize, I don't see a reason for PHP.