3 ms·
> If PHP is a rusty saw, what isn't? There are hundreds maybe thousands of languages. I was curious, there's about 9000 according to a cursory google search.
by wlll 6y ago
> If PHP is a rusty saw, what isn't? There are hundreds maybe thousands of languages.
I was curious, there's about 9000 according to a cursory google search.
> And when you measure all things (expressiveness, stdlib, productivity, ability to build a team, etc.) PHP would come up in TOP10 for any webapp.
>
> Of course, it has its gotchas. So does Clojure, Ruby, Python, C#, etc. Honestly, once a person knows PHP very well, switching a language has almost no impact besides their "feeling".
Maybe PHP is in the top 10 for some of the things you mentioned, and you can definitely build a PHP team pretty easily, however:
Productivity:
I am sure that most people can get their PHP programs to a state where they at least seem to do what they want, the problem with PHP is the sheer number of gotchas and edge cases. Here's some I put together for another commenter: https://gist.github.com/wjessop/0923e0667d7dd53ae0503459894e641c https://gist.github.com/wjessop/0923e0667d7dd53ae0503459894e.... It took me minutes to find these, there are many many more.
Sure, you might be able to get your e-commerce site off the ground really fast in PHP, but are you doing the job that you should be doing? Did you remember to check for every single edge case? Are you coding security flaws into your app? How sure are you that you didn't miss an edge case and you're tallying your basket wrong in some circumstances?
Unless you are very very good at PHP then you are going to miss this stuff and it's going to come back and bite you in the ass. There has even been a study into how bug-prone different languages are: https://www.i-programmer.info/news/98-languages/11184-which-languages-are-bug-prone.html https://www.i-programmer.info/news/98-languages/11184-which-...
A key phrase:
"The languages with the strongest positive coefficients - meaning associated with a greater number of defect fixes are C++, C, and Objective-C, also PHP and Python. On the other hand, Clojure, Haskell, Ruby and Scala all have significant negative coefficients implying that these languages are less likely than average to result in defect fixing commits."
All languages have flaws, but PHP has way more than most.
Building a team:
Most PHP developers are likely very average PHP programmers, just like most Ruby developers are likely very average Ruby developers. You would need to be a super-human to be able to program PHP correctly taking into account all the edge cases, and so yes, building a team is easy, but if you want to build a team that build software that isn't a liability, then you need to hire the absolute best PHP programmers, and that's going to be very hard.
So is it easy to build a PHP team? It depends.