News for hackers. Stuff that matters.
Re:The Future of PHP by deanclatworthy on Tuesday October 15, 2019 @02:46AM (#21256106)
It’s exhausting seeing these kinds of discussions. The only people who think PHP is dying is those who don’t use it. Besides the languages quirks, it’s incredibly productive and has a huge community of well engineered libraries for almost all mundane tasks. Theres great testing tools and general quality tool alike PHPStan. There’s an enormous pool of talent to hire from.

I code mostly in node nowadays, not through choice but due to the language snobbery I encountered during the last few years. It’s a shame. I find myself far more productive in the synchronous model than trying to bend my mind backwards with closures and async issues in the node world.

Re:The Future of PHP by thinkindie on Tuesday October 15, 2019 @04:16AM (#21256497)
There are other languages receiving way more praises like Python that at the end of the day are just lacking so many features that php gets right but still php is the bad guy.
Re:The Future of PHP by rokalakt1337 on Tuesday October 15, 2019 @04:54AM (#21256695)
Well, many of the Python fans are fresh graduates. They have been taught python because it's an easy language - no proper classes, little use of design patterns, coding standards and so on. The reality is PHP is still a thing, and will be a thing for a long long time. There is a package for anything you need in composer, and unlike most python libs, these have been tried and tested in production far longer.
Re:The Future of PHP by deragon on Tuesday October 15, 2019 @04:22AM (#21256528)
Like what features?
Re:The Future of PHP by thinkindie on Tuesday October 15, 2019 @04:34AM (#21256593)
types? interfaces?
Re:The Future of PHP by deragon on Tuesday October 15, 2019 @04:38AM (#21256614)
Types, sure. PHP 7 does those better than python, mainly due to the fact that the main implementation actually checks the types. Python seems to rely on 3rd party tools for that for some reason. Dunno if they're gonna change that or if they designed it like that.

Interfaces, hmm. PHP took its whole OO almost directly from Java, which is an odd thing to do given how different the typing disciplines of Java and PHP are. Python's OO system is much more in-tune with the dynamic aspect of the language.

Re:The Future of PHP by thinkindie on Tuesday October 15, 2019 @06:36AM (#21257178)
let's say that the only advantage of python over php are ML libraries but porting a library is far different job than creating an ecosystem
Re:The Future of PHP by thinkindie on Tuesday October 15, 2019 @04:41AM (#21256629)
yet if you want to start using python for large projects you have to come up with some hacks to make sure certain things are in check. With python is as easy as php to create spaghetti code and the language itself doesn't even help with that, however php is the only one taking the blame
Re:The Future of PHP by fleetfox on Tuesday October 15, 2019 @05:24AM (#21256835)
Python doesn't need interfaces because it's duck-typed. If by types you mean type-hints you can have em since 3.5. It's not as pretty as TS or even PHP with strict_types=1 (even though you can describe things that you can't in php) but it works. What Python has over PHP is strong typing, meta programming, data science and ML libraries. And from what i've seen better overall code quality if you pick random library from pypi compared to packagist
Re:The Future of PHP by deragon on Tuesday October 15, 2019 @04:24AM (#21256537)
>The only people who think PHP is dying is those who don’t use it.

That is absolutely not true. I didn't care about PHP at all when I didn't use it. Then I got a job where I had to use it (and the management didn't want to hear about changing it), and I started slowly disliking it. Then I got out of that job and again mostly forgot about it and curretly don't really care what happens to it.

Weird defences like yours resurge the dislike, so there seems to be some amount of lingering trauma. And of course there's the worry that the more popular PHP is, the more probable it is that I will have to face it again some day.

Re:The Future of PHP by luckylion on Tuesday October 15, 2019 @05:05AM (#21256747)
> Then I got out of that job and again mostly forgot about it and curretly don't really care what happens to it.

Yet you made an account here today for this story to tell people how you don't care and why python is better than PHP.

Are you sure you don't care?

Re:The Future of PHP by valand on Tuesday October 15, 2019 @04:55AM (#21256699)
The more accurate statement would be: The only people who think PHP is dying is those who is not using it

I had a similar experience as you. I used it for a couple of projects for a 1-2 years. When I realized PHP was an overpowered template engine, I started to think that it will be dying and moved on.

Re:The Future of PHP by colshrapnel on Tuesday October 15, 2019 @04:34AM (#21256591)
So, given you "don't care what happens to PHP", I assume you don't give much heed to whether it's winning or dying. That's basically what @deanclatworthy is saying, so there is nothing to fight about. Cheers!
Re:The Future of PHP by psychoslave on Tuesday October 15, 2019 @06:16AM (#21257092)
Without giving a hint on the market share of PHP in the future, I think it tells something about its attraction force.

I mean, I didn't coded much Ruby over the last months in professional projects, but I am still interested with its evolution because it was such a delight to use it with Rails.

Regarding PHP, well, I did some in the past, and my next professional project include to deal with a PHP code base. In the meantime, I didn't care to use it or look at how it was evolving, which is "as exciting as your toothbrush" innovations.

Re:The Future of PHP by deragon on Tuesday October 15, 2019 @04:35AM (#21256595)
I'm not fighting, I just gave a single data point that invalidated (logically, not actually) one part of his argument (the one I quoted) :) And then a bit of commentary.
Re:The Future of PHP by monooso on Tuesday October 15, 2019 @05:00AM (#21256721)
The argument isn't that every person not using PHP thinks it is dying. As such, I don't see how your response invalidated it.

Also, the statement "that is absolutely not true" should probably be backed up by more than your single data point.

Re:The Future of PHP by stunt on Tuesday October 15, 2019 @05:59AM (#21257010)
It is the same story for C++ and Java and they aren't going to die.

The more popular a language gets, the more critics it receives. Partly happens because you will see more mistakes and bad quality code which also reveals bad design decisions in the language itself.

Some languages have more quirks, especially if they are older and tend to stay backward compatible.

Scala was known as a well-designed language (I believe still is) but as the community has grown, the number of complainers also has grown at the same speed. we learned people can write horrible code with implicit conversions.

But you need those critics to detect anti-patterns, and bad APIs and hopefully either the language itself or some libraries will fix it for everyone.

Re:The Future of PHP by agumonkey on Tuesday October 15, 2019 @05:07AM (#21256755)
The price of php4 days man