James Gray of Linux Journal has published a lengthy email interview with me. Those who visit ongoing regularly won’t find much to surprise them; but I did take the chance to fulminate about dastardly DRM and Microsoft’s odious Office XML. And now that I think of it, I’ve been stingy with the polemics around here recently, maybe a little bland even; aren’t bloggers supposed to be ruthless attack puppies? It’s having a cute little girl baby around that does it I guess.


Comment feed for ongoing:Comments feed

From: Sérgio Nunes (Oct 03 2006, at 08:08)

Interesting interview, it's like an overview of ongoing.

One small question - when you say that PHP code is generally an "unmaintainable mess", I was wondering what template system are you using with Perl to avoid that kind of mess?


From: Aristotle Pagaltzis (Oct 03 2006, at 21:33)

Most people like Template Toolkit (which has been ported to PHP as Smarty). But in my experience the mess is for more reasons than just whether you mix HTML and code.

F.ex., I have written Perl/Tk apps, and that code always looked like a mess. Whatever I tried to do, I could never get the code to look *really* clean (though through what felt like titanic efforts I succeeded at making it sane). Then I started writing my GUI tools using Gtk2-Perl, and *I didn’t even have to try*. I made just minimal efforts and the code came out clean. The difference? Just the API.

Now look at the standard library that comes with PHP. There is no consistency whatsoever, and any units of functionality larger than a single function are a mess on the semantic level. The distribution of responsibilities is often peculiar. So just like I could never get my Tk-centric code into a reasonable shape, I never manage to get my PHP-standard-library-centric code into any reasonable shape either. The whole thing is a gigantic mass of hodge-podge quick&dirty hacks. As Larry Wall said, the PHP philosophy is “I thought of a way to do it so it must be right.”

The popular stuff on CPAN is lightyears ahead of what PHP has to offer in this regard. (There are many ways in which CPAN has spoiled me so rotten that I am unlikely to ever divorce Perl, even if I wanted to. Maybe if the Parrot plans come to pass as intended and I can keep CPAN close while venturing out.)

If you could scrap the current standard library and just keep the language core, then design APIs for all the extra functionality that’s currently in there from scratch (if you even *design* the APIs in the first place), you’d get a pretty decent language. It would still be weaker and less expressive than any other of the popular dynamic languages, but it would be feasible to write clean code in it and I think it would be just fine for a lot of purposes.

As matters stand, it’s not.


author · Dad
colophon · rights
picture of the day
October 02, 2006
· The World (147 fragments)
· · Tim Bray (31 more)
· Technology (90 fragments)
· · Software (82 more)

By .

The opinions expressed here
are my own, and no other party
necessarily agrees with them.

A full disclosure of my
professional interests is
on the author page.

I’m on Mastodon!