From the article: "You can learn PHP in a day or two if you're familiar with any other language. You can write PHP code in any editor or environment you want. Emacs? Vim? Notepad? nano? Who cares? Whatever floats your boat. Being a stupid language also means that everyone knows it. "
The author didn't spend a lot of time talking about learning PHP because there's not much to learn. There's nothing surprising in the components in the PHP stack. If you know HTML, adding PHP has low overhead. DB reads and writes are simple. If you can program in another language, you know all of the logic statements you need to write an application. If you need an example, there are probably tens of thousands of bad PHP tutorials online with bad sample code that still manages to work.
I've learned PHP and Common Lisp from scratch at different points in my life, and PHP had a much lower barrier to entry. I installed and configured PHP on my local machine and made a stats-tracking webpage all on the same day. This was my first server-side web application ever, plus my first database program ever.
Fast forward 4 years, and I worked through "ANSI Common Lisp" for a month before I felt comfortable writing regular applications in Lisp. Then I installed Hunchentoot and stumbled around for a while, but was able to figure out how to generate static content. Most of the Hunchentoot tutorials online were for older versions, but I found one that proved invaluable. I then ended up patching S-XML, because it was only written to support 5 or 6 of the 250+ "&" style HTML character codes. I sent that patch to the mailing list, but I bet nobody ever got it. I tried to hook up a database, and found Postmodern, which was nice. Thank God I already knew Emacs, but I wasted more than a day fighting with upgrading SLIME and SBCL at the same time.
The Common Lisp path doesn't sound so bad, but compare it to my PHP experience - I wrote an application on the same day I first looked at PHP. By the time I was integrating Database code, I was well over a month into learning Common Lisp.
People with the problems you mentioned are one of two types of people:
1. No prior programming experience. 2. Do not understand fundamentals of programming.
These are the people that use $var1, $var2, and $var3 instead of arrays.
Beyond that, if you can't be bother to learn the difference between =, ==, and === in PHP, you aren't bothering to learn, and have no reason to complain.
It's very close to trite. Yes, PHP is easier to learn. But if you're already proficient with Lisp, would you still be faster learning PHP? And if you are not up to speed with lisp, why the hell would you even be considering it for a time-sensitive quick-n-dirty job?
The question he set out with was "why is PHP more popular"? His answer is "because it's easier to learn and more popular".
I still have a Clojure book on my shelf, read almost the whole thing, got emacs off the ground with SLIME a few times, and haven't actually solved a business problem with it. I have existing code bases in Python and Java, and I can create way bigger wins by fixing the obviously wrong things with them than by bolting on some component in Clojure and creating a new area of "nobody knows what happens here".
Mayyyyyybe if you have specific needs then a lisp is a good idea -- if you're in a green field situation, have sufficiently complex application logic to justify an unusual web setup (this is much more rare than people think), and either know what you're doing with lisp and/or have a long timeline to figure out what you're doing. But it's pretty uncommon, and as awesome and elegant as LISP is, it's refreshing to see someone writing from everyday experience rather than "this is cool!" once in a while.
Common Lisp may not be a paragon of elegance, but it's not nearly as awful as PHP. And Common Lisp is a fairly conventional, mostly imperative language. Nothing as scary as Haskell or Prolog, or even Scheme.
It's the same as Worse Is Better: http://www.dreamsongs.com/WorseIsBetter.html
I've dabbled with Common Lisp for webdevelopment and I failed, miserably. I tried various the Mandriva package manager, downloading latest releases from the web, automatically and manually. It was already hard to get a bunch of packages together that where stable, somewhat current and compatible so I eventually quit.
If someone in the Common Lisp community could put together a web stack to get started it would help people like me tremendously. Lisps superiority is no point of discussion for me.
It took me 2 years to finally get comfortable with Emacs to the point I trust doing stuff in it, and I still don't know what I'm going to do if I ever start working in a language that doesn't have an editing mode available (it's not Textmate where you can define a syntax file in an hour).
For a whole month I studied Clojure, trying to wrap my head around it. I still have problems.
And now if I'd want to do stuff in Clojure, all web frameworks available suck for me (no, I don't like Compojure) ... which would mean I'd have to write my own ... or use Django, Rails 3, or even asp.net mvc 2 (even that is preferable).
Of course, being the yak-shaver that I am, I'll probably attempt to write a web-framework for Clojure of my own, but not when the clock is ticking.
On PHP ... doing PHP programming / copying popular websites was my first job. It took me exactly 1 week for going from a complete zero to someone that could get the job done.
I don't love PHP as there are truly better options out there, but libraries/frameworks are more important than languages. If Java frameworks would've been designed with an eye towards their users and not to please managers, it would've crushed all other high-level languages by now (and it did in many ways).
There are a couple of things a web-developer needs ... data-models, with validations, form/request handling with validations (forms that render themselves are a plus), authentication/authorization (OpenID/Facebook/whatever support should be available of course), CRUD generating (I don't want to work on stupid admin interfaces that show tables of existing items more than 10 minutes), session handling, caching support backed in, a nice templating language that doesn't suck ... and a (lazy) ORM querying language would be nice (bonus points if it has integration with NoSQL databases). And all of them nicely integrated of course, as I don't want to lose time trying to figure out how to blend them in.
That's not much to ask, and these are problems devs have struggled with in the last 10 years ... it is unacceptable to work just with servlets.
Clojure doesn't suffer for capability or libraries. It has that in spades and then some. The main thing missing is a site that documents how to use these pieces in concert to accomplish common web programming tasks.
The challenge is to prove that those smart programmers working in that smart language are still more productive than the average programmers that started with the problem 75% solved out of the gate. For basically solved problems like CRUD webapps you won't be able to do this. For harder problems like scheduling air travel you might but then you're working in a problem domain too difficult for at least 3/4 of the working programmers today so you're in an even smaller niche.
PHP is pretty bad when it comes to reusable libraries. PEAR is a pretty unusable mess, the Zend "framework" is a bit better, but still not that all-encompassing. Core PHP is a huge hodgepodge of very bare wrappers around C libraries, without a decent module system or OO layer.
The documentation is often centered around newbie questions and most frameworks really reinvent the wheel -- and quite often Ruby on Rails (which is pretty painful considering the PHP execution model).
I'd rate the library repositories of Perl, Ruby and Python above that, and even with some paradigm mismatch, Clojure's access to Java libraries is at least on par with PHP (PHP/C vs. Clojure/Java).
As another poster noted, Clojure gives you access to the Java libraries, which is a huge, huge win for Clojure vs most other functional languages but gluing that stuff together is still going to be more work than it's worth if you're not doing something really unusual with your site.
The functional web stack that looks the most promising to me at the moment is the Play framework with Scala. It seems a lot simpler and more manageable than Lift and Scala drops in pretty nicely in place of Java. From what I can tell there are still a lot of rough edges but I think it's a combination worth keeping an eye on.
Clojure (or any functional language) doesn't have a tiny
fraction of the libraries/frameworks/documentation that
PHP does.
Well, you get all those Java libraries out there for free ('free' as in automatically, not necessarily 'free' as in without paying)You know, not to get dragged into a stupid language debate, but for any language, a proposed solution without documentation is not a solution.
Clojure I'm evaluating for my own project.
This article could easily be turned around to something like "use emacs, lisp and the trusted framework you already know, or try to learn PHP with its inconsistent naming and verbose syntax and ..."
Essentially he's judging languages by "wall-clock time", but only including time-to-learn in one of them.