I would say, the blogging-about-programming elite, rather than the actual programming elite. I haven't coded PHP in years, but some of the most brilliant devs I know use it when it fits the task.
I would say, the blogging-about-programming elite, rather than the actual programming elite. I haven't coded PHP in years, but some of the most brilliant devs I know use it when it fits the task.
People who say PHP is badly designed, however, aren't talking about the implementation; rather, they're strictly talking about the language itself—the syntax, the semantics, and the standard library. There is no advantage to the way PHP-the-language does things; it makes nonsensical choices (like the flat, disorganized, all-libraries-included function namespace, the inability to chain method calls in a single expression, the extreme amount of "weakly-typed" cruft surrounding the comparison operators, etc.) which derive no benefit.
It would be strictly beneficial to the programming ecosystem if PHP-the-language were treated as an object-code for other, better-designed languages to target, such that PHP-the-implementation could be used without needing to write in PHP.
What's good about PHP is the execution/dispatch/deployment model, which papers over massive deficiencies in the infantile implementation (much less the know-nothing language).
Care to give some proof?
Say, performance-wise, MRI is not any worse than PHP[1]. And as far as I understand, PHP implementation is just plain horrible[2].
[1] http://shootout.alioth.debian.org/u32q/benchmark.php?test=al...
[2] http://blog.paulbiggar.com/archive/introducing-malicious-cod...
PHP was great a few years ago, and by great I mean "one of the only options". PHP is active on every shared web host around. It's the norm. Only recently have the likes of Ruby and Python become popular on shared hosts. Personally I think that's fantastic.
edit: that's not to say he didn't make up the statistic for his opinion.
* Java has a really repetitive syntax, but it's libraries might make up for that.
* C++ with all it's features has bazillion ways to shoot yourself, but it's arguably fast and the syntax is bearable.
But php has both an ugly syntax, horrendous stdlib, and fame of security issues.
Maybe COBOL or MUMPS could be worse than php... haven't used these though.
Your "worst" is probably ill-defined: C is bad for web programming, but is certainly an elegant language and pretty good in its niche.
To me, both are effective at the tasks I need them to accomplish.
Is Instapaper merely adequate, or is it better? Would it have been that much better if it was constructed in Rails?
IIRC, Instapaper's a PHP application. I could have mentioned a larger site, but Instapaper was probably a better example, since it's quite popular with HNers.
But yes, it would probably be more easily maintainable if written in a better language, and the developers would be able to add new features more quickly.
To comment based on your metaphor, the problem is not that the screwdriver/hammer is ugly. It's that the grip doesn't feel right and it's unbalanced. You can turn the screw and drive the nail, but it takes more effort and might leave your hands scraped up.