5 ms·
Every time there's a story about PHP there's a comment like yours, and then in reply there's a comment like mine: Yes it's perfectly fine to use PHP if it's a
by simias 6y ago
Every time there's a story about PHP there's a comment like yours, and then in reply there's a comment like mine:
Yes it's perfectly fine to use PHP if it's a productive environment for you. Of course it's possible to write good software with it. Of course a skilled developer will manage to do great things with sub-standard tools. Many extremely popular websites were and even still are powered by PHP, that's undeniable.
But that doesn't mean that we should absolve PHP of all its many, many design errors over the years. There were for a long time many fundamental issues with PHP as a language that didn't exist with its peers. The language was not so much designed as it was cobbled together by amateurs starting from a half-backed templating engine.
I'm not saying that to hate on PHP, I just believe that it's important to learn from your mistakes if you don't want to end up reproducing them. It's important to acknowledge the many failings of PHP even if many of them are now ancient history.
This revisionist stance that there was never anything really wrong with PHP and it's just Lispers who hated on the language because it was popular and beginner-friendly and they didn't know what they were talking about is simply, factually, provably untrue.
- castis 6y agoNo one is claiming that PHP is and/or was without fault. The sentiment is that we built things that worked despite them.
- ragnese 6y agoThat's not being fair. There are many comments on HN of people saying exactly that PHP just isn't bad. The grandparent reply even says: >My only real gripe with PHP is the annotation syntax.
- nkozyra 6y agoThe parent comment claimed that PHP's former sins were being absolved. The quote you are referencing is about the current state of PHP.
- ragnese 6y agoThe parent comment to mine, though, said: > No one is claiming that PHP is and/or was without fault. I'm emphasizing the "is" part. "No one is claiming that PHP is without fault." My comment is asserting that there are definitely people who say that PHP is not bad. I did not speak to whether anyone claims PHP was never bad.
- castis 6y agoI should have known better. My apologies, the person simias is replying to is not saying that PHP is without fault.
- nkozyra 6y agoWell let's be clear ... "bad" is a little more subjective than "faults," which can at least be qualified. By some measure, every language has warts. PHP in 2008 had a ton of them. PHP in 2020 has fewer of them. Which is a lot like JS.
- ragnese 6y agoBut if PHP in 2020 still has a TON of warts and other languages (even ones with large ecosystems) have WAY FEWER warts, does it matter if PHP has improved since 2008?
- nkozyra 6y agoAgain, I stopped messing with PHP at 5.7 and have watched 7+ grow. My daily language is Go, which I like a lot. Had or have runs with python, asp!, Perl, c#, node, delphi and used rust and Java for personal projects. I can find warts in all of them. At one point I'd have put PHP right above JavaScript and ASP down at the bottom. Now? I don't see it. Legacy issues are still there, like inconsistent standard library function names, but otherwise I don't see it - as a whole - as any more 'warty' than most of those.
- elric 6y agoI never said it was the only problem with the language. I said it was the only one that really bugged me. You're more than welcome to attack my opinion of PHP (which seems like a silly thing to do, but you're welcome nevertheless), but please don't put words in my mouth.
- nkozyra 6y ago> This revisionist stance that there was never anything really wrong with PHP This strikes me as a strawman. PHP spent years being a generally loathed language for reasons that at this point aren't really worth reiterating. But, in an analog to Javascript, it has made progress, grown up and become a better language. One of the best? Like Javascript, no. But serviceable at worst. I stopped earnest work in PHP ~ 5.7. I dabbled with HHVM, but eventually moved most backend/server code to Go and moved on with my life. But PHP 7+ has been a big step up, at least from my current vantage point.
- SahAssar 6y agoJavascript has made progress too. While far from perfect and I think PHP's journey started at a worse point has has gone further JS certainly is a lot better now and the major failings of JS are of it's ecosystem and not the language itself. I also think that both JS and PHP get a lot of flak for maintaining backwards compat as far back as they do. You can run a lot of webapps (frontend and backend) from 10-20 years back in modern PHP and browsers which is pretty amazing. I'd like them to have a modern mode (like the proposed p++/<?php2020 and modules for JS) we should still acknowledge that maintaining compat that far back is not easy.
- nkozyra 6y ago> Javascript has made progress too. To be clear, this is what I was saying when I called upon it as an analog.
- SahAssar 6y agoAh, then I misunderstood. Thanks for clearing up
- datasage 6y agoIf you don't do that, you get the python 2 to 3 transition. Which is still going on. PHP did drop some stuff between 5 and 7, but all of it had been marked deprecated for some time prior (often years).
- 6y ago
- elric 6y agoFrom a language design perspective, you're absolutely right. I started with PHP 3, shortly before PHP 4 was released. 4 and 5 were major improvements over 3. And sure, a lot of cruft remain(s|ed). And there are definitely things that could be better. But overall, it's a pleasant language to work in.
- bityard 6y ago> But that doesn't mean that we should absolve PHP of all its many, many design errors over the years. There were for a long time many fundamental issues with PHP as a language that didn't exist with its peers. The language was not so much designed as it was cobbled together by amateurs starting from a half-backed templating engine. Your entitled, holier-than-thou tone here is not welcome. You must have never created a technical design that solved the stated problems but, in retrospect, turned out to be the wrong decision. Or worked on a project that started out small and flawed but eventually grew into something powerful and reasonably elegant. And clearly, no other programming languages except PHP have ever had to deal with the fallout of certain design decisions that couldn't simply be taken back. I am looking forward to your reply where you point me to the github repo containing _your_ implementation of a project meeting all of the goals of PHP while containing none of the drawbacks. Only afterward do you have the standing--regardless of how tasteless the action--to hurl insults at the working programmers who have devoted their time (paid and unpaid) to the open source project and get phrases like "amateurs" and "half-baked" in return. > I'm not saying that to hate on PHP But you certainly and obviously are. > This revisionist stance that there was never anything really wrong with PHP and it's just Lispers who hated on the language because it was popular and beginner-friendly and they didn't know what they were talking about is simply, factually, provably untrue. I don't think you'll find anyone rational who will claim with a straight face that PHP has no issues. Thus, this is a strawman.
- dang 6y agoPlease don't take HN threads further into programming language flamewar. That's one of the things that destroyed earlier internet communities, leading to the founding intention of this site [1], which is not to turn into scorched earth [2] or at least to stave that fate off for a while longer [3]. [1] https://news.ycombinator.com/newswelcome.html https://news.ycombinator.com/newswelcome.html [2] https://hn.algolia.com/?dateRange=all&page=0&prefix=false&query=by%3Adang%20scorched%20earth&sort=byDate&type=comment https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu... [3] https://hn.algolia.com/?dateRange=all&page=0&prefix=false&query=by%3Adang%20stave&sort=byDate&type=comment https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...