by samdk · 14y ago · 0 comments
Your suggestion that people improve PHP instead of attacking it is naive. PHP is, as you said, a big legacy open source project. As a result of that, it's basically impossible to make the extreme, breaking changes that many people (me included) think would be required to make it a reasonable competitor to the existing options. (And the PHP community is not especially inclined to change. It took years for short array syntax to get added to the language. If something as obviously beneficial as that is going to be hotly debated, making real, breaking changes is impossible.)
Faced with the alternatives of trying to radically change PHP (which is, as I said above, impossible) or to use and improve other languages and frameworks, I think the choice is obvious. It was one thing 5-10 years ago when there weren't necessarily good or mature alternatives, but we have many choices now. In my opinion, it makes very little sense to use something with as much extraordinarly painful legacy baggage as PHP unless you have an exceptionally good reason for doing so.
* Note that I am not including myself in this list. But any trivial search for "what's wrong with PHP", much less "PHP sucks" produces 5+ years of very bright, articulate, sometimes downright famous programmers making this same point about PHP. Most recently Jamie Zawinski at http://www.jwz.org/blog/2011/05/computational-feces/#comment...
Issuing holy decrees from their ivory towers more like. Meanwhile, lots of tremendously successful companies doing real work in PHP each and every day, at the coal face, where it matters. Does their hard work deserve this constant ridicule?
> The only way to improve PHP is to replace it, and we have a long way to go to get there.
Agreed. When something better comes along, I'll start using it (like how I switched from Perl to PHP a long time ago). The problem is, many "eloquent, smart programmers" are too busy "posting long, well researched screeds" to spend some time making PHP better (or making a better PHP).
Nobody seriously criticizing PHP is ridiculing people working with it. On the contrary, I personally applaud people having to, and succeeding at extracting diamonds with a broken pickaxe.
> The problem is, many "eloquent, smart programmers" are too busy "posting long, well researched screeds" to spend some time making PHP better (or making a better PHP).
A "better" PHP would be at its core so entirely different and incompatible with the current PHP that calling it "PHP" would be a complete misnomer. Since it would be such a different language/platform with only vague syntactic and semantic similarities, one might as well invest its time in the better designed, actively developed, battle-tested, currently available alternatives.
I rarely see this. I've found it hard to find a good criticism of PHP that doesn't find a way to insult it's user base.
Probably the best criticism of PHP has come from Jeff Atwood's recent post[1] (and even he couldn't go the post without slinging immature, and downright vulgar insults).
1. http://www.codinghorror.com/blog/2012/06/the-php-singularity...
If you could deploy (say) python-decorated web pages via apache (on el cheapo hosting services) versus write yor own server and figure out how to host it then the problem would be solved. We have the languages, just not the ecosystems.
Obviously I'm not the first to observe this. Mod_python exists, it's just not popular.
Some of these servers are so easy to install and use, so much EASIER than Apache, that it really gets ridiculous to complain about.
mod_python has been deprecated for years in favor of mod_wsgi, which uses an actual standard. That you don't know this shows that the problem is too much documentation guiding people to things which are no longer modern or standard. If you use Apache, use mod_wsgi, it is infinitely better.
webfaction costs $5.50/mo, lets you do proper Python deploys rather than endless hacks and has good support, if you need cheap Python hosting.
Also, PAAS offerings like Heroku and Engine Yard make deploying sophisticated rails environments far more convenient than their PHP equivalent.
> "sticking code snippets in web pages"
You can do exactly this in ruby with ERB, but many shy away from this approach due to a distaste for the bolognaise pattern.
You should try ruby/rails/sinatra on your next project, it will change your life.
This is a terrible, terrible idea. There are a few Python frameworks which have tried similar things, but Model-View-Controller was invented for a reason.