3 ms·
How has PHP lost its way? It grew up from a poorly thought out hacky scripting language to a major programming language. All the nasty code you could write in
by esskay 4y ago
How has PHP lost its way?
It grew up from a poorly thought out hacky scripting language to a major programming language. All the nasty code you could write in PHP 4 or 5 is still possible, but everyone will look at your code and laugh.
- bluetomcat 4y agoThere are many other possible directions the language could have evolved in since then. For example, an emphasis on its dynamism and statelessness rather than introducing a static Java-like OO model for building hierarchies of classes. Or a modular system that encourages the user to put “complex” code in C modules, making application development as simple as calling a few functions.
- danjac 4y agoMaybe because there are already major programming languages at that level already, which arguably do things better: if you are going to have a Java-like OO model, then just use Java (and leverage its ecosystem, tooling etc). Whereas there is a niche for a quick-and-dirty scripting language for just getting something up and running.
- tehbeard 4y ago... You can still hacky script in it, my dude. I have to do that several times a year for stuff like one-off ETL's for customer data, or to verify an idea before rewriting it properly.. Absolutely nothing about modern PHP stops you from writing like the crayon-muncher you were back in the early 2000's... You just also have the option, to, you know, use battle tested libraries and work with cohesive community driven standards now as well.
- esskay 4y agoIf you honestly think Java is the solution to replace PHP you clearly know very little about the language and its usage.
- cbsjjxhcc 4y agoPoorly thought out? Only the language that runs most of the internet and invented the term tight development loop. All the modern crap has just moved us further away from this.