News for hackers. Stuff that matters.
Re:PHP Sucks by vesak on Thursday June 16, 2016 @11:20AM (#11916715)
>I'm very tired of hearing that PHP sucks. PHP is a good language

And I'm quite tired of hearing this silly, totally meritless defense in every single thread that discusses PHP. Can't we just agree that it's not a very good language, but people are still doing cool stuff and lots of money with it? So many pointless fights could be averted like this.

Re:PHP Sucks by novaleaf on Thursday June 16, 2016 @12:07PM (#11917036)
A personal anicdote, but I run a SaaS, and there is an extremely pronounced (negative) difference in the sophistication of technical support queries asked by PHP devs vs those in other languages. This may be because PHP is so ubiquitous and approachable, but these types of silly questions (how do I make a POST call to your API?) are why PHP gets it's reputation.
Re:PHP Sucks by caseysoftware on Thursday June 16, 2016 @12:28PM (#11917156)
Yes, the biggest strength of PHP is that anyone can pick it up quickly... which means anyone will. There are "best practices" but they're not necessary to get the job done.

I usually recommend that new developers start with Python. It teaches structure and consistency without as much variation or room to screw up.

Re:PHP Sucks by reitanqild on Thursday June 16, 2016 @12:52PM (#11917309)
Tell people to code it in Java or C, preferably in vim.

Advantage: they'll never create a mess that you'll have to maintain.

/s

Yes, I totally agree with you: the advantage of PHP is that anyone can pick ut up, and they have done.

The question was often never if it should be coded in PHP or Java but if it should be coded at all and, if so: if it should be an excel file on a file share or sent in email or a php script.

Disclaimer: PHP and Java coder. I can get stuff done quickly in Java, but it takes some practice.

Re:PHP Sucks by trebor on Thursday June 16, 2016 @11:54AM (#11916945)
I'll agree that what makes a good language is subjective, and that most all languages have their problems. There is a certain threshold where "good enough" is what matters.

Personally, I'd rather everyone just stop the good/bad language debates entirely.

Re:PHP Sucks by VeejayRampay on Thursday June 16, 2016 @12:17PM (#11917097)
Programming has to be the only environment where the voices of academia don't seem to matter because "my language gets shit done". Deep inside, what do you think those researchers in the PL community, the people that know the ins and outs, that theorize about languages, the people who spent years and years learning about the theory behind it all, who created the OCamls, the Haskells, the Coqs, the Idrises and so forth, what do you reckon their opinion of PHP is?

So really I don't think "good language" is subjective. PHP is not fast, it's not well-designed, it's not particularly terse, it doesn't have particularly great tooling (Facebook has made that better with their HHVM initiative in all fairness), it isn't consistent and easy to reason about and the worst offender of all, it doesn't offer a dramatically different or original model of thinking about programs.

What is has going for it has nothing to do with the language itself: jobs, ecosystem and easy hosting. I totally agree that a good language is whatever works for you, but in the meantime, "whatever is good enough" is a mindset that doesn't help us strive for something better, which does matter if we're going to collectively spend decades in this line of work.

Re:PHP Sucks by reitanqild on Thursday June 16, 2016 @12:56PM (#11917326)
> Programming has to be the only environment where the voices of academia don't seem to matter because "my language gets shit done".

Wrong, otherwise we would have this discussion in Esperanto.

Sometimes Real Life (TM) experience beats clever design. PHP was first, has iterated, always had a niche and is now better than ever. Not good but good enough to save people a lot of work.

Re:PHP Sucks by Shorel on Thursday June 16, 2016 @12:44PM (#11917262)
Re:PHP Sucks by VeejayRampay on Thursday June 16, 2016 @01:14PM (#11917455)
I don't quite grasp your logic. That comparison only means that PHP is faster than other slow languages. Being faster than slow doesn't mean you're fast.
Re:PHP Sucks by reitanqild on Thursday June 16, 2016 @12:54PM (#11917322)
> it doesn't offer a dramatically different or original model of thinking about programs.

In PHPs niche this should be in the advantages section.

Re:PHP Sucks by snorfonius on Thursday June 16, 2016 @06:22PM (#11919346)
Hi Veejay, I do not know for how long or just how intensely you have been in contact with the "academia" so far, but let me tell you this: however much a certain solution is promoted in academic circles has close to nothing to do with how useful it actually is to general (programming) society. The average academic bases his assumptions of what makes a language "good" or "bad" on 6-12 months of internship at a medium sized company (preferably in a mgmt/assistant position), some tutorials he went through and 5 years of theorizing with a professor who did his last serious programming work back in the 1980s. Granted, this approach sometimes yields exciting innovations that might someday be adopted by real world applications. But this does and will not make Haskell and OCaml appropriate for the other 95% of problems developers have to solve.