dcabrejas
Joined 7 years ago
Joined 7 years ago
Javascript, PHP, Haskell, Rust, C++ and LISP. I'm familiar with the benefits and drawbacks of all of them and I don't see how any of them replaces PHP
If we say once a better language comes along, we should say that the old language is shit and should die, then sure keep doing that. But looking at the languages that you have listed above, none of them are dynamically type I belive although not familiar with a couple of them. For some small projects people might prefer dynamic typing, or if you are prototyping something.
Also the amount of libraries, frameworks and projects already written PHP is massive so if someone wants to do something fast, why limit people's choices by trying to convince everyone that the language is shit instead of letting people decide for themselves? It just feels like a witch hunt to me.
You are right, I did sneak in there that I find PHP less verbose than Java as an advantage, since most people complain about how much typing you need to do in Java I thought this was worth highlighting.
However personally I think PHP evolving to be more similar to Java was a good thing, even better because imo they copied the good parts, ie: OOP instead of the verbosity but that's up for debate.
In short, becoming more like Java was good, but PHP isn't Java and has its own advantages for web development, imo this is that it is less verbose and easier to write.
You can get used to that in 10 min and move on with your life, it is not a reason to not pick up the language, it's bike shedding.
The productivity point was a secondary point but when it comes to building websites I think people can build faster in PHP although I guess that depends on many factors.
1. Its variables start with $ and that is ugly: I mean, come on, I won't even entertain this bigotry.
2. It used to be better before: This is just pure nonesense, before OOP PHP wasn't good to create any big and well-structured application, it is ironic because most of the bad opinions about PHP come from people who used it a long time ago. Besides, you can still use PHP as you used to, but now you have more tools at your dispossal, You are free to use it as before.
3. It is trying to be Java: Well, sure it is more like Java, only less verbose and easier to write. Developers can be much more productive in PHP. And moving in the direction of Java is not a bad thing as the language moved into the Enterprise space. I worked with Magento every day and I am glad the language is more than Java than it used to be, it means we can organise our code better. Again, ironic that some people who mentioned this as something bad about PHP, then went on to say they prefer Java.
4. Composer has made the language worse: Honestly this is so ridiculous... so now having package managers is a bad thing? I haven't met an actual professional PHP programmer who holds that opinion. All of them like composer, it makes reusing code and creating apps in PHP much easier.