Is Python appropriate for web applications?

bruno modulix onurb at xiludom.gro
Fri Apr 15 09:17:04 EDT 2005


Unknown User wrote:
> I am a Python programmer and I'm thinking about learning PHP, which is  
> similar to C++ (quite
> different from Python). I want to start writing web applications. Do 
> you  think if I learn
> PHP I'll develop faster? Does PHP have more features? How about the 
> speed  of execution? What
> are the pros and cons? Our server can run both Python, Perl and PHP, so 
> I  have the choice.
> Thanks for your opinion,

<rant topic="php">
I loosed 2 hours this morning debugging PHP code. There were 2 problems.

The first one was a typo in the name of a variable ($actegories instead 
of $categories). Instead of raising an exception, this b**d "programming 
language" (err...) just created a new variable with a NULL value. Doh :-(

The second one was about array concatenation/union. I had used the "+" 
operator instead of the array_merge() function.

Read the PHP doc about the "+" operators for arrays and the 
array_merge() function (don't forget that PHP uses the same construct 
for arrays and mappings - doh). Then imagine yourself programming PHP, 
and ask yourself if you'll really develop faster with such a braindead 
quick&dirty hack for language.
</rant>

PHP-is-VB-for-the-web-ly'yrs
-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for 
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list