
Originally Posted by
Illuminous
Old thread, but I forgot to answer, so here goes.
I'm not comparing RoR to PHP. I'm talking about Ruby, the language. I'm not the stereotyped php-basher and rails-praiser.
One thing I'd love to see in PHP is consistency. First OOP (which I by the way don't claim is the solution to everything) was a slap-on in PHP 4, then in PHP 5 you add interfaces and abstract classes and whatnot, and it still feels like an afterthought. PHP can't decide for itself what it wants to be. The standard library has no conventions whatsoever. There's confusion between references and values. PHP is dynamically, weakly typed, almost the exact opposite of strong typing. And then they go and add type hinting (which doesn't work with builtins)?
Reflection also feels like an addon. PHP must rely on hundreds of patterns to ensure that programmers to the Right Thing (tm); without, they're totally lost, it seems. Whenever someone complains about how badly many PHP scripts are designed, a bunch of people explain that if they had just used Pattern XYZ, it would all the fine. If these things were obvious and came naturally when using the language, the problem would go away.
The list just goes on and on. To summarize, PHP doesn't know what it wants to be, and ends up doing none of the alternatives well. I'm not one for language wars (they're fun, but ultimately you've got to choose the right tool for the right job), but I honestly can't see any job for which PHP is the best tool.
Ruby, Python and friends are great beginner languages, but not PHP.
Bookmarks