On Wed, 2010-05-26 at 16:36 -0600, Jeff Schroeder wrote:
> PHP doesn't contribute to poor coding practices any more than Perl does.  

Perl is a pretty low hurdle, but PHP can't even make it over that.

Perl did database access right ages ago with DBI. How long did it take
PHP? And how many apps still do it wrong?

Perl provided namespaces ages ago. How long did it take PHP?

Perl has maintained impressive backwards compatiblity for, well, forever
practically. How many minor releases does PHP average between gratuitous
compatibility breaks?

Perl never thought register_globals was a good idea. Perl never thought
magic_quotes was a good idea. Perl never thought addslashes() would fix
anything.

You know... now that I think about it... Perl isn't such a low hurdle
after all. Sure, it's syntax is complicated, but nothing so brain
damaging as PHP.

Maybe it'd be better to compare PHP and C.

Yup. C. Tiny standard library. No namespaces. Braindead stuff like
gets(). *shudder*

And yet... Although I've seen some bad C code, I've seen much more, much
worse PHP code. Empirically, PHP seems to be more damaging. 

Whereas C's mistakes have been recognized for decades, and the weak get
culled from the herd quickly, PHP is just close enough to almost working
without requiring conscious thought that PHP developers can wallow in
ignorance for a very long time. The can even create projects that, like
meth, look safeish if you squint just right. And after awhile their
users start to think that scratching their skin off and losing all their
data to SQL injection is normal.

The big difference between PHP developers and C developers is that C
developers would never consider trying to solve all their problems with
C. They know the sweet spot for their language, and they have other
tools in their belt. PHP, on the other hand... I'm not sure it has a
sweet spot... Used to be a pretty nice template language I guess.

Most PHP users are probably too young to recognize when they do it, but
echoing the old argument that "you can write FORTRAN in any language" is
silly. It's not like PHP was created under the same constraints and lack
of prior art that FORTRAN was. Running for the same refuge is a clear
admission of defeat.

But PHP the language is just a symptom of PHP the community. Starting
from the top with language designers that have demonstrated an
impressive capacity for stunningly stupid ideas, down to poor newb being
misled by reading bad code and listening to mush-headed role models, PHP
has a larger population of damaged developers than any other F/OSS
community I know of.

Just to be clear, I'm not saying you can't find smart developers using
PHP. 

I'm willing to recognize the existence of legacy infrastructure and weak
job markets.

But I'd like to point out that said smart developers probably have more
enjoyable after-work hobbies that help them cope. Like cutting,
auto-asphyxiation, and repeatedly punching themselves in the face until
they black out.

-- 
"XML is like violence: if it doesn't solve your problem, you aren't
using enough of it." - Chris Maden


/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to