re: Why some people hate PHP? VIEW POST


Programming languages are tools. Some languages are more suitable for a particular domain.

PHP is a tool for a fairly narrow problem domain, albeit an incredibly popular domain.

For all the PHP haters out there, the next question ought to be "Well what would be a better tool to use in this problem space?"

To quote Bjarne Stroustrup, "There are only two kinds of languages: the ones people complain about and the ones nobody uses."

My primary programming language is C++. I have a love-hate relationship with C++. I've been using it for the last 27 years.

When I consider my project, there is no ROI in rewriting the application in a different language. It would take years to port. Assuming the entire team was working on such a ill-advised rewrite.

Be that at it may, as a thought experiment, I've considered what would be suitable alternative languages that would be better than C++ for my project. Maybe... C, Go, C#, F#, Scala, Clojure, Swift, D, or Delphi/FreePascal/Oxygene. That's a big "maybe", and for each alternative language to C++ there are pros/cons tradeoffs, rather than clearly superior language.

PHP is likely in the same situation. What would be a viable alternative languages to PHP, for problems which are well suited to PHP's wheelhouse?


Ruby on Rails would be one reasonable alternative to PHP.

I'd probably choose Elm.

Otherwise, Python on Django... because I dislike both Ruby and PHP, and I like Python. But that's just me.

However PHP has a certain appeal* that Ruby, Python and Elm don't have.

* not to me; but I can see where PHP lures kids into the van.

Code of Conduct Report abuse