4 ms·
The "problem" is that PHP's popularity breeds more popularity, uninformed choice, and single-language programmers that only know PHP (a real tragedy!). Bashing
by kev009 14y ago
The "problem" is that PHP's popularity breeds more popularity, uninformed choice, and single-language programmers that only know PHP (a real tragedy!). Bashing PHP is in a serious sense a public service if it can reduce any of these outcomes.
- troels 14y agoSo, the problem with PHP is that it is popular? I guess it was the same crime that Java committed 10 years ago. And C++ before that. Makes sense - There's definitely a pattern of bashing the popular languages.
- brudgers 14y agoThe problem isn't that it's popular - television programs about Bigfoot are popular, too. The problem is that PHP is extremely useful and easy to use in addition to being widely used. Reading the article, I was struck by its similarity in structure and language to classic Windows bashing rants of the past two decades - i.e. "the problem with PHP is that it has no taste." In fairness, the call to action is radically different; to build rather than to buy something.
- troels 14y agoWell, I doubt it would ever become popular if it wasn't useful and easy to use. Actually, I think it is exactly because it's popular. All languages have odd ends, but you rarely hear people rant over Pythons lack of lambdas and weird explicit "self" parameter or Ruby's incomprehensible scoping rules. I'm betting that once they fall out of fashion, we will. And no, I disagree. The main sentiment of the article is negative. It's a call to figure out how to dethrone PHP, but without telling us why this would be such an important goal.
- brudgers 14y ago>"Well, I doubt it would ever become popular if it wasn't useful and easy to use." Like Windows 3.1?
- mikeash 14y agoI hear about them a lot. The difference is that PHP is so much worse. Yes, every language has warts. But PHP is the only popular language I know of which is essentially nothing but warts. Of course that's subjective, and people disagree, but there really does seem to be a real, qualitative difference between the warts on a mostly nice language like Python, and the ubiquitous bizarro world that makes up just about the entirety of PHP.
- wvenable 14y ago> But PHP is the only popular language I know of which is essentially nothing but warts. This is entirely untrue. PHP isn't even a bad language on the scale of actual bad languages. It has some warts but they don't really impede the development of good software. There are many languages that make developing good software nearly impossible.
- mikeash 14y agoWhat other popular language is as bad? COBOL? I don't know about impeding the development of good software. Warts can always be worked around as long as you know about them and how to handle them. But that doesn't mean they don't matter, and PHP has so many that it's difficult to enumerate them. What other popular languages silently convert strings to floats and then do math or floating-point comparisons on them? What other popular languages have literally hundreds of failing unit tests in their mainline implementation, allowing ridiculous and insecure regressions that were actually caught by testing but never noticed to ship in an official release? I doubt there's any one wart that's exclusive to PHP. What's remarkable about PHP is how it manages to gather so many in one place. Each one alone is not that bad, but the sheer number of them is astounding.
- wvenable 14y ago> What other popular languages silently convert strings to floats and then do math or floating-point comparisons on them? JavaScript. Most of the "issues" around comparisons/conversions/etc equally applies to JavaScript as it does to PHP. But PHP does some very stupid casts but it's really just one problem. In the lists of "failures" tend to show that same problem 15 different ways to show how screwed up things are. If your code is well designed and secure you don't encounter these problems anyway. > What other popular languages have literally hundreds of failing unit tests in their mainline implementation... I'll give you that. Since that happened, the PHP developers have worked to ensure it won't happen in the future. No platform is free of particularly big security fails (Rails).
- anon01 14y agoYes, because PHP monoglots have their homepage set to codinghorror.com and browse right over to Hackernews afterwards. It is not a public service, it is a waste of screen space. The startup scene's dirty little secret is that (anecdotal from several local companies I've worked for and/or collaborated with) PHP development is fast and cheap. Once you have proven you can solve a business problem and get funding, then you can decide if you really need to do a re-write. There are just too many small companies focusing on real problems(instead of what language their webapp is built in) to make me think PHP is evil or that Rasmus Lerdorf is a bad person.
- trebor 14y agoI don't fit in your box. And I still think PHP is a decent language for introducing people to programming. I've written web apps in: Ruby (both Rails and Sinatra), Javascript (Node.js with Express), PHP (my own framework, CodeIgniter, and eying Laravel), and been maintenance programmer for a C CGI application. I've written desktop and CLI apps in Object Pascal (Lazarus and Delphi), to CLI apps in Go, C++, and probably a few I've forgotten. I've done Object Oriented, Evented, and to some degree Functional programming. I am a polyglot programmer. The problem is bashing PHP. As Jeff said, PHP's power is its ubiquity and its near omnipresence. It runs on just about any platform with any configuration, with almost perfect consistency. For the most part there's no switching extensions or libraries because of the OS. Develop wherever... deploy wherever... get almost an identical experience without lifting a finger. In fact, I have great hope for the future of PHP with 5.3 and 5.4 as they (finally!) have added and improved upon the language, and have begun to cull deprecated features. The problem for PHP right now is twofold: web hosts refusing to upgrade in a timely fashion, and legacy codebases that refuse to be rewritten. Both these are demanding backward compatibility, and slowing the advance of PHP. I'm tired of the bashing of PHP. Bashing, in general, is the absolute least effective way to communicate your point. At least Jeff Atwood is attempting to do something.