Hacker News new | ask | show | jobs
by ma2rten 5143 days ago
As someone who worked for a major European social network written in PHP, I can say with full confidence that PHP's syntax and it's standard libraries are objectively worse than those of other languages (as in inconsistent and less productive).

That being said there definitively good frameworks out there for PHP and having good libraries is much more important than the syntax of the language, so becoming familiar enough with another language until you are as productive as with PHP might not be worth the effort for you.

1 comments

"As someone who made his own opinion on the subject, I can objectively say that my opinion is the right one"

Seriously ...

It doesn't matter which language is "objectively better as a programming language", just use whatever you enjoy the most. If it's PHP, then have fun coding in it rather that use something else because some people on the internet think you should. There are tons of very successful project in PHP, including giant ones, because at some point you stop circlejerking and start coding.

Just make sure you know what else exists out there and try other things here and there to discover new languages and other ways to do things, but that's a general programming rule, not something limited to php.

I don't even know why I am having this discussion:

To me the concept of a fun programming language does not make sense. Programming languages, frameworks, etc are tools and they suited for certain task. If you use the right tool for the right task programming is fun. PHP, however, is not the most productive tools for any (reasonably complex) task. This is just a fact. If you want to challenge that fact, give a concrete counter-example.

However, like I said before you can still be productive in PHP. I am still doing occasional programming in PHP and I don't hate it. I just wouldn't use it for a new project.

Amen to that. The minute someone utters PHP someone else inevitably goes out of their way to let you know it sucks even if it's not at all relevant to anything you're talking about like in this case.

Guess what? Every language, framework, technique, theory, etc. sucks because someone else thinks theirs is better. "Oh youre a JavaScript person? Eww, action script is better, yours sucks. Like C++? Gross! ISO C is far superior! Using Rails? Well I feel sorry for you because Sinatra is faster and less bloated". Point is, no matter what your platform, stack, or combination of technology choices are someone will inevitably rant about how it sucks then get a blog post about it on the front page of HN.

Seriously, enough with the crusades and religious fervor over your development choices. Let's compare apples to apples and be constructive in our criticisms. Instead of looking at nodephp and balking because it's in PHP how about criticizing it based on its merits. What are the goals? Does it achieve those goals? Are there similar projects that do it better? What are the use cases for this? This thread started that way and is now devolving into another religious dispute.

Comparing it to nodejs is fair if you take into account that it's best used by those with hosting restrictions or people who are just partial to PHP and those who want to use it with large existing projects. It's not fair to throw out general "PHP sucks" arguments. That's not relevant. Sucky or not, does this software work and is it useful? Yeah.

it's best used by those with hosting restrictions or people who are just partial to PHP and those who want to use it with large existing projects.

We were talking about if PHP is the right language to use if there is legacy code and hosting does not plays a role.

Further up the line ubiquitous hosting was mentioned. Even so, it's still yet another way to judge its usefulness.
I wish I could up vote twice. No thrice, no 4 times..