Hacker News new | ask | show | jobs
by toadkicker 3496 days ago
It's really silly that is how the culture behaves. The right tool for the job is a common moniker in other industries, yet in ours its the source of heated debate and hipsterdom.
1 comments

PHP is some tool that was never really good, but had some compelling features that no other tools provided. Except that now there are better tools for any task it solved, excluding the task of "maintaining a PHP codebase".

If you are starting a new project on it, you should indeed feel silly.

I disagree, -- sure if you're building native php apps w/out a framework.. but Laravel is probably the easiest MVC framework out there to pickup and build something that works super fast without having to know how to deploy a VPS, etc... For small to midsize php is STILL a workhorse -- but I wouldn't recommend wordpress or vanilla php themselves.

Laravel collections alone make it almost a functional language when using it w/ laravel.

Have you looked at the PHP landscape over the past few years? You may still not love the syntax, but PHP as a language, an ecosystem, and a developer community is extremely strong. It's a fantastic choice for a web app in 2016.
Honestly, no, I haven't look at it in the last 7 years. (It's being that great! Thanks for lighting-up my day.)

Also honestly, I don't think I should look now. The PHP applications I see around are still the ones getting serious vulnerabilities found every week, the same ones that other communities found ways to pack the solutions into tools and conventions that are easier to use than not to. I also don't see anybody claiming PHP has any new template system to replace the dated original one.

I've seen some progress on the language, but not nearly enough to make it compelling. I have plenty of stuff already on my ToTry list, PHP would have to say something better than "I'm not a complete mess anymore" to enter it.

You can of course choose to still avoid it - but your advice to other devs to do the same makes little sense. It's a completely different beast than it was 7 years ago.
Do you know of any compelling reason, instead of problem fixes?

Because the language is a bit archaic (has maintainability problems for large codebases, has the "too little power" problem for small codebases); as far as I have looked, the ecosystem still does not include a good templating system (although it does include most of the tools available on other web ecosystems); and the community is still heavy on applications with the same kinds of security bugs they always had, and many, many "X-only" developers.

And, anyway, fixing those outstanding problems can only make it an ordinary language. And there's no reason to look at any language that the best claim is "it's not worse than any other random language".

I disagree. Let's try adding 0.2 and 0.3 with the JScript library of your choosing and see if it's any easier than PHP.
Javascript being bad does not make PHP any better.

There are more than 2 languages available for backend programming. Some even get both templating and IO right.

Floating point math has been around for a very long time, I don't get why that's what you would pick as a problem; a lot of languages have the same behavior. I'm not a fan of JS either, so you don't have to give me a reason to dislike it.
I wasn't necessarily giving you a reason to dislike it. I was giving you a reason why I personally believe it to be over-hyped and convoluted (and why I disagree that PHP is embarrassing by comparison).

I picked floating point math as a problem because JScript would give you an incorrect answer.