IT Conversations: Rasmus Lerdorf - PHP
Rasmus explains how the first version of PHP would just recognize special tags and replace them with calls to C code. Then he started adding conditionals, and the parser got immensely more complicated, because he didn’t know about compiler theory. Then came along these guys from Israel saying “hey, we’ve just taken a college class in compiler theory, why don’t we write a proper parser and interpreter for PHP”, and they did. Now, it takes experience to apply theory to practice, and so they weren’t quite happy with the result, and redid it for the next version of PHP. And now, with PHP5, they’ve added “some” object-orientation to the language. But it still carries all the baggage, and it’s just not designed from the ground up to be anything, really.
What I realized listening to Rasmus explain the accidental story of PHP is this: When the web sprang into existence, it also created a new kind of software development, where the cost structure and risk structure is much different from the shrink-wrapped software business. Fast response to changes is also much higher on the agenda in the web world: When you’re running an online store, you want to be able to respond more quickly to changes in the market than the typical two-year release cycle for software.
The response to the challenges of the “old” world of software was compiled languages, particularly C and C++. The response to the new world is interpreted scripting languages like Perl and PHP.
The depressing fact is that, while C and C++ are proper, designed languages, at least PHP, according to Rasmus himself, wasn’t even intended to be a programming language. Decades of experience with language design has been ignored. PHP has added all those things over the years, and PHP5 “behaves as if it was object-oriented”, whatever that means, according to Rasmus.
I think the “scripting” (or Agile) way of developing (or growing) a large class of software (operating systems, computer language interpreters, and space shuttle control software not included) is the right one. It’s not to be snickered at in any way. It’s simply the most appropriate tool and approach for the job.
So it would seem that what we need is a proper programming language to do this. One that has been designed as carefully as C#, from the ground up, to incorporate the best of modern langauge design, including obviously object-orientation and garbage-collection, and it needs to be a fully dynamic, interpreted scripting language. After David’s demo Monday of Ruby and Rails, I’m starting to think that Ruby might actually be that language.
Why would professional software engineers work in accidental languages like Perl and PHP, when there are real languages out there that do the job. Python might be an equally suitable alternative.
As an aside, Java surely is not. It’s a static, compiled language, which is not what’s called for in the world of Agile web development. I would think that C# has the same limitation, though I’m not sure.