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."
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
You sir, are a cretin.
Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
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
Translation: "Perl 6 code will be the most unreadable Perl ever."
Rich And Stupid is not so bad as Working For Rich And Stupid.
"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 hereby nominate Larry Wall for a Private Eye Terrorballs
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.
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.
It's warballs, actually.
Freedom is not increased by mere diminuation of government. Anarchy is freedom for the strong and slavery for the weak.
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.
Sure! Perl! :)
Yes. The fish.
Try out fish, the friendly interactive shell.
Funny you should mention that. After meaning to for years, I finally got around to getting the "Learning Python" book... I made it to page 149 where it says "Python uses the indentation of statements under a header to group the statements in a nested block." I stopped reading and tossed the book on my bookshelf on a shelf full of unused & unloved technical manuals. It now sits between the Postscript redbook from 1990, and a late 80's book on Ada. It really belongs next to a Fortran book, but I don't own one.
A shame too... The rest of the language is so clean.
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.
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
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
> I made it to page 149 where it says "Python uses the indentation of statements under a header to group the statements in a nested block."
> I stopped reading and tossed the book on my bookshelf on a shelf full of unused & unloved technical manuals.
One of the best things a programmer can do is try different languages. Try lisp, sql, haskell. Play with xml and yaml. Compare J2EE to Ruby on Rails. Try a language that doesn't use ALGOL-inherited code blocks. Just like an 80s ACM article said, the single best way to evaluate a programmer is by the number of languages they're fluent in.
At the end of the day Python's indentation causes a few programs, but seems to solve more. It makes it hard to share source code via email. It rules out the use of tabs. I can live with those limits. On the flip side it helps reinforce readable code. That's a very good thing - and consistent with the fundamental philosophy of the lanuage: the code must be easy to maintain.
But if you really can't get your head around that, then try Ruby. Like Python it's a well-designed, easily maintained language with a great community and future.
Funny you should mention that. After meaning to for years, I finally got around to getting the "Learning Python" book... I made it to page 149 where it says "Python uses the indentation of statements under a header to group the statements in a nested block." I stopped reading and tossed the book on my bookshelf on a shelf full of unused & unloved technical manuals.
This is such a naive and stupid statement. Avoiding a language because block structure is dealt with via indentation instead of {}s? People repeatedly use this as an argument against Python. "Oh, it's got a great library, excellent documentation, responsive community. Oh, it uses indentation for block structure? Never mind." Just dumb.
What exactly is the problem?
Python uses the indentation of statements under a header to group the statements in a nested block.
haha, never mind that this is exactly how your code should be indented in the first place....
"Python uses the indentation of statements under a header to group the statements in a nested block."
A language called Occam (used on a long since forgotten late 80s parallel
CPU called a Transputer) did the same and was derided for the same
reason. Funny how some people never learn.
The enforced indentation in Python is what makes the code readable! Anyone's code, everyone's code. Exactly the opposite situation of the crufty Perl. Unless you're one of those programmers that relies on obfuscated code as some sort of twisted employment security program, this is nothing but a good thing.
What a shame. When I began writing Python code, it only took me about 10 minutes to realize that I had been indenting anyway so brackets were wasting my time and cluttering my code. Try it before you knock it.
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-
Do you also cry when other languages require you to end a statement with a semicolon? Help, help, I'm being repressed!
Suit yourself. I've found that over 90% of the people who publically state that they've migrated from Perl to Ruby or Python or PHP were drawn in by features of those languages that they *thought* Perl didn't have. Some of them are rather shocked when you show them just what they've left behind. And each one of those languages has borrowed a lot from Perl anyway (hell, PHP used to be *implemented* in Perl).
:)
Use whatever language suits you best.
Personally, I don't fully agree with Larry about one thing - I have yet to see Perl 5 hit any serious limits. The only way I see Perl 5 hitting any limits is in the fact that us Perl people want to go orders of magnitude more insane than we ever were before, and we simply need to re-invent programming once again to do it.
Until Perl 6 hits, I'll happily continue producing mod_perl portals that will smoke the competition in performance, security and robustness. When Perl 6 hits, well, we'll have a nice party on our hands
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.
I think this is the real point!! I see this move all over the place. Perl is passe today with most new scripted code being written in Python and PHP. Many developers want the structure and OO design of these languages. Perl has lacked that in a strict sense. I love to program in Perl but I see its days numbered. I too am migrating to Python and PHP. Its not because I hate Perl but the need to have something more like Java and C++ is limiting my use of Perl. I see the move to Perl 6 being about 4 years too late. Perl 6 should have come out in 2002... a language with a better grasp of OO programming. But Perl 6 even today seems to be more vaporware than a real language. When will we really see a full Perl 6 implementation. It looks like Pug is still a couple of years away from being mainstream?? By that time, anyone who will need the functionality of Perl 6 will have already moved on to another language.
I dunno - I've used both Python and PERL and am an avid PERL user. I find that with good practices ( create both { and } in series then insert properly indented code inbetween ), the presence of {} around code snippets allows for EASY debugging. I just couldn't get used to the indention FORCING marriage to a block of code. As has been stated before, proper programming techniques means you're already indenting code with nested loops, but what about the ol' copy-paste from a block one level deeper that would throw everything off. I'm not talking about a situation where a subroutine should be used either - I'm talking about "Oh I remember coding that for xyz project - I'll just swipe 80% of that code and insert the rest for my current project".
I made it to page 149 where it says "Python uses the indentation of statements under a header to group the statements in a nested block." I stopped reading and tossed the book on my bookshelf on a shelf full of unused & unloved technical manuals.
Hold on... it gets to page 149 before pointing out the most important thing to be aware of in the language's syntax? That's a terrible book. Get another one.
Seriously, though, I was put off Python for a long time for the same reason. I've used whitespace-significant languages before (COBOL, and a functional language called Miranda) and had no end of trouble with indentation issues. But when I tried Python, it just worked, flawlessly. I've never had an issue because of indentation. The language works, it's easy to write, and programs are easier to read due to the lack of excess symbols. The syntax is very clean and readable.
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
You can use tabs for whitespace in Python code, you just get into trouble if you try to mix tabs and spaces in the same file. It counts one tab and one space as the same thing, so things won't look correctly indented visually (if your editor shows a tab as four spaces wide).
Just use one or the other and don't mix them.
Same here. Try Ruby.
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.
Well, for one: it makes communicating about the language difficult, e.g copying and pasting examples from html, web forums, e-mails, etc.
;-), partly because I think it's a good a idea to expand my programming language repertoire) but that doesn't change the fact that it was a bone-headed decision to make indenting syntactically significant. If Guido considered that so important, he could have just made it a syntax-error... but then still use braces for the delimiting. Heck, for all I care, the python interpreter could then re-indent it *for* you. But, to put such important information into the one class of characters which:
Because: One of the paradigms of computing (particularly in the Internet era) is that white-space is semantically/syntactically insignificant. Many programs and protocols ignore the amount of white-space in text, or at least just treat it as a delimiter. That fact alone means Python code doesn't play nice with that stuff. Sure you can have forum software which allows for formatted code and such, but that's not the point. Why did Python have to break such a well-established paradigm? White space is to delimit syntactic/semantic elements... it shouldn't *be* one.
That said, I am in fact learning Python now (partly because of Civ IV
- html *ignores*
- diff has an option to *ignore*
- most editors have an option to *convert* (tab to spaces, etc.)
- etc, ad nauseam.
well... you get the point. Right?
-chris
San Francisco values: compassion, tolerance, respect, intelligence
I'd usualy end up fixing the indentation in any other language anyway. IDLE (the default/most common Python code editor) includes very convenient tools for altering the indentation of selected text, and in fact most programmers editors have these anyway. For me, it's no big deal. Simon
An interesting post for those of us interested in your personal biases, but since you didn't actualy try it out, we have no idea whether you would actualy have found it useful or easy to adapt to. I have to admit I came across discussions and introductions to Python several years before I actualy tried it out and the whitespace issue did put me off. I immagined it would be awkward to use and would overly complicate code editing. I was wrong. In practice I found it wasn't. Instead it makes the code so much cleaner and easier to read. You might have found the same thing, and you might not, but we'll never know. Simon Hibbs
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
You can use tabs for whitespace in Python code, you just get into trouble if you try to mix tabs and spaces in the same file. It counts one tab and one space as the same thing, so things won't look correctly indented visually (if your editor shows a tab as four spaces wide).
In practice you just use a decent editor with a Python mode/plugin and hit tab. The editor indents and converts the tabs to spaces but, usefully, has smart backspacing that eats a tabs worth of spaces when closing a block (and in many editors conveniently tells you which block you are closing in the minibuffer or equivalent). That combined with automatic indenting on newline means that, for the most part, you never have to concern yourself with indenting any more than you would when writing properly formatted C, Perl, or Java code.
Jedidiah.
Craft Beer Programming T-shirts
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.
...but what about the ol' copy-paste from a block one level deeper that would throw everything off.
Any editor worth its salt has a python mode/plugin, and in that there are convenient functions for "shift left" and "shift right" which will move the selected text one indentation level left or right. Cut and paste your code, then just shift it to the indentation level required. It really isn't that hard.
Jedidiah.
Craft Beer Programming T-shirts
"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
haha, never mind that this is exactly how your code should be indented in the first place....
I'm not going to disagree. I just don't need the associated misbehavior that comes along with it if I fail to indent things right. Copy/Paste mistake, or similar and you have problems. Most of the major languages have chosen to ignore the significance of whitespace. It's a substantial mindset to relearn.
We're talking about a scripting language. Development speed is important to me, and I don't need my scripting language being needlessly pedantic because I cut and pasted an old section of code. Is this a form of laziness? Yes, absolutely. Is it wrong? My CPU's don't seem to have an opinion, it's all 1's and 0's to them.
I have a choice of several dozen languages to choose from. Why pick one that would annoy me? YMMV.
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 got to work with INMOS Transputers back in 1988. Been trying to forget them ever since.
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.
Ruby is on the list. I'm not into web development though, so I'm still trying to sort out the relevance. I do systems QA development, and Perl works fine, but the OOP stuff bothers me. It works... But there's just something not right about it.
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
What does Ruby have to do with web development? I suspect you think there's some connection there because of the popularity of Rails, but it's not the case.
Which is what I suspected... But I haven't had to time to sit down and figure out for myself.
More importantly though, most of my coding would be best described as "system management" scripting. Automated install and configuration of large applications. Some languages are better at this than others. Perl is excelent, but I'd like something with ground up OOP support. I haven't had time to learn Ruby, so I don't know if it meets my needs. Everyone fawns over Rails for web development, which I'm simply not interested in.
Python would appear to have most of what I need, but it also appears that GVR wants to enforce his view of what is "correct" on the rest of us via whitespace significance. I'm probably getting old and cranky, but I don't feel like I need to have my hand held like this, and I certainly don't need the aggrivaiton that comes with it when trying to debug something.
If you write code with insignificant whitespace, then you write unreadable code. No one on a web forum or receiving an e-mail wishes to receive a bunch of unindented code. So what is your argument, that when you use explicit nested scope delimiters, I get to run your unindented code through a pretty printer in order to read it?
That's a great idea. That's way better than preserving indentation.
Where is it exactly that you distribute all of this code without indentation, again? Nowhere, right?
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.
Well, for one: it makes communicating about the language difficult, e.g copying and pasting examples from html, web forums, e-mails, etc.
If your conclusions about programming language are based primarily on how easily you can cut-n-paste code samples from rich-text email and HTML (outside of <pre> elements) then you need to step back and think about your career, IMHO. And it easy enough to reformat a code block if you have a decent editor: the Emacs Python mode makes such reformatting quite straight forward. The Python interpreter can't do this for you: indentation implies semantics, and you do not want the interpreter doing this.
HTML ignores whitespace because HTML was designed for exchanging textual information, not source code.
Diff has an option to ignore whitespace, but by default it includes it. Since it is insignificant in many situations, ignoring it can be useful. This is not an argument that whitespace is ipso facto bad.
Editors have an option to convert spaces to tabs (or vice versa) because in those editors you rarely can't tell the difference, and the mixture of tabs and spaces yield very ugly results when looking at plain text.
Writing off a language for such a silly reason as its use of indentation for block structure is ignorant. Arguments that this screws up copying from your favorite website are specious.
[duck and cover]
That's because the postgres users have nothing better to do
[/duck and cover]
Why UNIX?
I used Slashdot's ecode tag in the above, which indents the entire block. The sub and } lines are not indented, but the comment and print lines are.
Besides, there are better ways to distribute code:
GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
but what about the ol' copy-paste from a block one level deeper that would throw everything off.
Remind me never to look at code that you've written. Every time you copy and paste code, you keep the indentation the same as before, so that by the time you've finished a project the indentation and block structure have nothing to do with each other?
Ewige Blumenkraft.
Ruby does meet your needs. That's exactly what I use it for most of the time. I'm gradually converting all my Perl scripts to Ruby, cleaning them up and making them OO on the way. Fetching RPMs for SuSE boxes from restricted FTP sites, assembling newsletters from bits of web and mailing them out via SMTP, reporting on disk usage by directory, and so on.
/etc APIs, for example.)
Ruby has very easy to understand scoping, not much syntax to keep track of, a clean implementation of OO, dynamic typing, and interfaces to most POSIX stuff you'll need. Take a look at ruby-doc.org for the standard library and core Ruby documentation. The online free 1st edition of "Programming Ruby" is all the tutorial and reference you'll need to decide whether you like it. It doesn't force a particular style on you, though there is a clear style favored by the community.
Some of the library documentation is a bit lacking, but people are working on that. (I recently documented the fcntl and
GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
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?
I agree that Python's elimination of brackets for code blocks does reduce the number of symbols. However, I look at it the exact opposite way: their removal doesn't make the code more readable because excess has been trimmed; instead, their removal makes it less readable because useful visual cues have been taken away.
To me, Python's removal of the brackets for code blocks is really more about making the syntax look cleaner than it is about making it more useful. Sometimes simplifying and removing redundant elements in order to reduce clutter and improve aesthetics is fundamentally at odds with usability.
Also, as someone else mentioned, using only whitespace to indicate blocks makes it difficult to have consistent intermediate stages when you are changing the struct of a block of code. Want to move a significant chunk of existing code inside an if statement? In a language that uses braces (or even "endif"), you put the markers in place and then fix the indentation. If you screw up the indentation (by missing a line here or there) in the process, the structure is not lost because it's captured in the markers. It's much easier to change two lines correctly than it is to change N lines correctly. With a traditional language, indentation errors result in bad style, but with Python, they change the semantics of your program. It seems like this would make the task of editing Python source unnecessarily difficult. That kind of brittleness seems like a high price to pay in order to eliminate the clutter of brackets.
It's a shame too, because Python seems like a language with a lot of potential if it weren't hamstrung by the decision to take a radical stand on a syntactic issue that doesn't even stand to accomplish much even if a "victory" is won, especially considering that it has essentially nothing to do with the real purpose of the language as far as I can tell. To be honest, as an outsider to Python, it's a little off-putting since it makes me wonder if the language designers have any other linguistic axes to grind that are going to result in other painful things for those who use the language.
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.
If your conclusions about programming language are based primarily on how easily you can cut-n-paste code samples from rich-text email and HTML (outside of elements) then you need to step back and think about your career, IMHO.
;-)
...to wit:
Not so humble, and borderline offensive. I never claimed my conclusions about Python were based primarily on this. Reread my post, and you'll see where I state that I am in fact learning Python. I think you might be confusing me with the other poster above. I also said nothing about rich-text email (which I never use). I was giving *an* example ("For one...") of how this aspect of Python is annoying.
The Python interpreter can't do this for you: indentation implies semantics, and you do not want the interpreter doing this.
My point exactly. I said, that if braces *were* used, the semantics would be independent of the formatting, thus the interpreter *could* reformat. And *that* was based on the premise: *if* it's so important to Guido that the language enforce it (by which I meant the design goal stated when defending the advantage of indent-based blocks)...
HTML ignores whitespace because HTML was designed for exchanging textual information, not source code.
Ummmm... you'll have to explain to me how "source code" is not included in the definition of "textual information"
[snipped a bunch of 'rebuttals' to my examples]
I was listing those examples to support my statement that there is a paradigm of treating white-space as its own semantic category. It was not meant as an exhaustive list. The point was that it is a wide-spread paradigm, and going outside that paradigm has some disadvantages (sure they can be overcome, but the necessity of overcoming them is itself a disadvantage), and the stated advantage (forcing proper indenting) is by your own argument (modern editors, etc.) minimal. As has been stated in other replies, any slightly decent programmer is already following good indenting practices and/or is using an editor which will automatically indent where appropriate; however, there are cases where alternative indentation *can* make code more readable -- and I'll admit I've only just started with Python, so I'm not sure if the following is the case -- and as I understand it, Python would not allow a programmer to make that decision to indent one part of program slightly differently (to improve readability) without changing the semantics.
Writing off a language for such a silly reason as its use of indentation for block structure is ignorant.
As I already stated, I haven't written off anything. I just think that's a bone-headed aspect of Python. There isn't a language out there that doesn't have bone-headed aspects. Are you so offended by criticism of Python that you have to be offensive to me?
Arguments that this screws up copying from your favorite website are specious.
<sarcasm>Oh yeah dude, I couldn't copy that cool Python script from my nude celebrities website, I'm soooo bummed.</sarcasm>
That was the implication here right? Come on, don't be such a jerk. I was trying to explain that there is a non-emotional component to the aversion to the indent-based blocks in Python, and instead of looking at my arguments you try to play the "experienced programmer" to my "dilettante web-designer dude off the beach".
Copying from a website was an *example* not the argument; nice strawman, though.
-chris
San Francisco values: compassion, tolerance, respect, intelligence
Apologies --- my response was written more in tone to the original parent who dismissed the language simply because of the use of whitespace. My point is that this is not a good reason to dismiss this, or any other, language. Comparing it to FORTRAN is disengenuous because Python does not require indentation to specific levels or specific tab stops. All Python requires is consistency within a given level. The examples of posting Python code to websites as a reason why whitespaces in Python are bad doesn't hold up.
With regards to my statement of source as not being textual information, I should have been more clear. HTML was designed with support for natural language textual constructs: paragraphs, lists, enumerations, etc. that are displayed in a serif font (by default) and where consequtive whitespace is ignored on purpose. One would not use these constructs to represent a block of code, because whether it is Python, C, C#, Perl, or whatever, the formatting will be completely hosed. Instead you put this in a <pre> element, in which case formatting is preserved. Hence you get the results you want and expect. If someone misuses the markup, then you are SOL.
The fact of the matter is that Python's "required" indentation is almost always (I am hard pressed to think of an exception) what you would expect to write clear and concise code. I find that Python does things the way I would expect it to: it often just works. The syntax is clean and easily described.
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.
Apology accepted, and we'll just have to agree to disagree, since (fittingly) I am too busy working overtime auditing some bone-headed Perl (heh) to answer in depth; note: it's not something that would be helped by better formatting ;-), just an abuse of hard-coded parameters which belong in a config file making the whole code-base too 'server specific': a problem which could exist in *any* language, alas.
-chris
San Francisco values: compassion, tolerance, respect, intelligence
So have you seen the Whitespace programming language? If not, you should google for it. You'll be impressed
;-)
(And then you should look up the Brainfuck programming language. You'll never complain about perl or python syntax again.
Those who do study history are doomed to stand helplessly by while everyone else repeats it.
This very true. You should spend some time to learn some basic Python and write a few scripts in it. After doing so you'll fully appreciate how much forced whitespace really sucks.
You know, at first I agreed with you. Emacs seemed to take care of the indentation for me, and I though, 'hey, this isn't as bad as I thought'. And then I tried to actually refactor some code. You see, the minute you start moving blocks of code around, the editor is largely helpless, as it's impossible to know, just by examining a piece of code, what the indent level should be. Example:
if (a == b):
while (c == d):
do_some_stuff
more_if_statements
while (e == f):
do_some_stuff
Now, let's say you decide to move the 'if' statement inside the while. You cut and paste, and then try to reindent. But... wtf... the editor did this!
while (e == f):
if (a == b):
while (c == d):
do_some_stuff
more_if_statements
do_some_stuff
That ain't right. So now you have to go back and fix it, which in this case is relatively trivial, but for any complicated body of code, it's *incredibly* tedious. And there's no way for the editor to get this right! The minute I started running across this, I decided to put Python on the shelf... it's simply too damned annoying.
I think you need to invest some time in learning block shifting commands. In Emacs under Python mode that would be python-shift-left and python-shift-right, conveniently bound to Ctrl-c < and Ctrl-c >; that will collectively shift the selected text one indent level left or right, preserving indentation within the selection. Any other editor worth using has similar commands. To move code around for refactoring just cut and paste then shift the whole block you cut and paste left or right to the appropriate indentation level. Simple, easy, and efficient.
Jedidiah.
Craft Beer Programming T-shirts
Heh, you're absolutely right, I should. :) Thanks! I've habitually just moved code, marked the block, and did a C-M-\... obviously that approach doesn't work with Python.
Well... no, but of course Perl already has Acme::Bleach which covers that quite nicely ;-)
:-) I already knew about Brainfuck though; you gotta love the kinds of things programmers do with their free time :-P
So, just looked Whitespace up. Pretty funny
-chris
San Francisco values: compassion, tolerance, respect, intelligence
I guess the word "counterintuitive" is an oxymoron in your universe ;-)
Seriously, give it a try! I find it's a great relief when I can trust that the indentation and the program structure always match.
Slashdot needs +1 Gracious!
:-)
I must be having a bad day because your post almost made me cry
The trick with Python is to trust the indentation, which is very, very hard when you have 10+ years of experience telling you that indentation lies.
At first my mind kept looking for the curly braces in Python code. Now, when I'm editing C++ code, I'm annoyed because I realize I'm looking twice at every block: using the indentation to guide me because it's easy and I can't help myself, while subconciously (and sloppily) checking the curly braces because I know that indentation means nothing to the compiler.
I've found that over 90% of the people who publically state that they've migrated from Perl to Ruby or Python or PHP were drawn in by features of those languages that they *thought* Perl didn't have
Actually, one reason for leaving Perl behind is that it has too many features. In my experience, people get up to speed in PHP much more quickly than in Perl, and they end up producing more maintainable code.
Until Perl 6 hits, I'll happily continue producing mod_perl portals that will smoke the competition in performance,
The operative word there being "I".
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.