Language war of the moment (was Re: [clue-tech] I'm blind, or why is this PHP fwrite() failing?)

Matt Gushee matt at gushee.net
Mon Sep 26 11:04:03 MDT 2005


David L. Anselmi wrote:

> No, they aren't.  But the language strikes me as useless.  Take the 
> first comment here:
> 
> http://us2.php.net/manual/en/language.operators.logical.php
> 
> "The novice php php developer should avoid creating functions which 
> might produce a FALSE on failure and an integer on success, if there is 
> any chance that the integer might be zero."
> 
> It's no surprise to me to have multiple values for truth or untruth. But 
> to be able to return a boolean or an int at will and have the int cast 
> to a boolean seems to be rather more surprise than less.  Imagine 
> yourself trying to debug that one--shouldn't a language help you avoid 
> those kinds of mistakes?

Maybe, but how is that different from Python or Perl, which you seem to 
prefer? [Disclaimer: though I used to be a huge fan of Python, and still 
use it and like it, these days my favorite language is OCaml, which is 
statically typed and (usually) compiled. So this is really just Devil's 
advocacy].

> I'm no programing wizard, nor language guru.  And I understand the lure 
> of being able to build web apps quick and easy.

Yes, and I think from a Web-design perspective embedded scripting is 
very attractive because it puts you closer to the target domain from the 
beginning. A script that generates a Web page is an abstraction, and not 
everybody is good at thinking that way. A PHP script *is* a Web page, or 
at least can be. From that perspective, a templating system based on a 
more coherently designed language (Python, maybe?) is even better, but I 
guess there wasn't much in that space when PHP was invented.

> But if they wanted a 
> web app framework couldn't they have adapted an interpreter for a tried 
> and true language?  And you can build web apps in Java, Perl, and Python 
> (oh, and lisp too).  I don't understand what people find compelling 
> about PHP--what did everyone else do wrong?

I dunno ... maybe they spent too much time trying to design their 
languages right ;-)

But all is not lost. Check out TurboGears. It's a new Python-based Web 
dev framework--somewhat similar to Ruby on Rails, I guess, but what sets 
it apart is (a) they're gluing together what they believe to be the best 
existing components, rather than reinventing the wheel; and (b) unlike 
many, these guys have a clue about marketing. For the long term, my 
money's on--if not TurboGears per se, then something like it.

--
Matt Gushee
Englewood, CO, USA

_______________________________________________
CLUE-tech mailing list
CLUE-tech at cluedenver.org
http://cluedenver.org/mailman/listinfo/clue-tech



More information about the clue-tech mailing list