Python v PHP: fair comparison?
Luis M. González
luismg at gmx.net
Wed Nov 15 00:30:20 EST 2006
>> Yes, php is only for web.
>
> Absolutely false. Most of my standalone, command-line scripts for
> manipulating my unix users in LDAP are written in PHP, although we're
> rewriting them in python.
>
> Although I can't think of a single app written in php that's not web-
> based (other than standalone scripts I have written), there are up-to-
> date php bindings for GTK: http://gtk.php.net/
>
> Michael
Fair enough, this has been possible due to the enormous popularity of php.
You can also hit a nail with your shoe instead of using a hammer, and if you
try hard you may even succeed. You can also digg a a grave with a spoon
instead of a shovel, and after a couple of days you'll be finished.
You may be able to use php to create a stand alone app, but php was created
with the solely purpose of being a tool for creating dynamic web sites.
And you have to admit that using php for a non-web app is like trying to fit
a a square into a round hole.
Php is no more than a simplified C-ish language, dynamically typed with a
lot of functions aimed at web tasks. Without these built-in functions,
there's little you can do with it in your web apps.
On the otehr hand, you don't need a thousand built-in functions in python
for achieving every single task on a web site. You just write them, often
with just a couple of lines, because the language is that flexible an
consice.
You don't have to remember each and every function for every task, this is
ridiculuous.
I think that even as a general purpose language, python is still much more
adecuate, fast, fun and flexible than php for building web apps.
Luis
More information about the Python-list
mailing list