If I were in charge of giving out awards I would give PHP the "Most improved language of the 21st century." PHP3 at the turn of the century was trash but it was easy to build websites with it and it was easy to find people to do so for you. PHP8 is a world away from PHP3.
Python is a better candidate imho mostly because of the explosion in its use case in the past decade, especially due to data science/AI fields.
I have a hard time going to another language that requires appending semicolon at the end of each line, dealing with curly brackets, and requiring a bunch of middlelayer tooling.
I'm willing to bet that I can train someone without any coding experience in Python. It's built for readability and very accessible. Javascript? No way I would introduce them until they get some handle. PHP? Not unless I am trying to create a sweatshop.
Python was started from the educational side of computer science. As such its core concepts and architecture are solid.
PHP was started more as a quick hack by a single developer just playing around. More and more stuff got tacked on and the result was a steaming mess. It's been busy fixing its conceptual mistakes since version 3/4.
I'm willing to bet that I can train someone without any coding experience in Python.
I doubt it, maybe some hyper genius, you need to try and see how someone new to programming understands thing. Stuff that is super obvious to us is just unclear for a new person.
I find Python quite easy to read but I still prefer C-style code without significant whitespace. Those braces make it far easier to spot block level errors, especially when using some form of auto-indent or a linter. Semicolons are less important - I hardly ever concatenate lines of code - but they don't bother me either.
JS has grown a great many tools, libraries, and features, but as language semantics go it’s hard to say that primordial JS was seriously broken anywhere. Coercions, maybe. It’s not a language I can love, but it’s one I can accept.
PHP’s lack of coherent style and the persistent thrill of not knowing which horrible errors it’s willing to silently swallow and proceed, on the other hand, are (were?) much harder to tolerate.
Reddit’s r/lolphp has some “great” memories of many of the shortcomings (most of which are historical now fortunately). My favorites are probably the randomly long and short function names, due to length being used for hashing, and DATE_8601 not being compatible with ISO-8601.
EDIT: Don’t want to start a flamewar, it really has improved over the years. Nonetheless, it has a less than bright past.
Let’s be honest, both language had place for improvements (other languages didn’t leave as much to be desired), and fortunately both became quite usable nowadays.
Comments
If I were in charge of giving out awards I would give PHP the "Most improved language of the 21st century." PHP3 at the turn of the century was trash but it was easy to build websites with it and it was easy to find people to do so for you. PHP8 is a world away from PHP3.
i would say JS (both the language and the VMs) has come even farther
Python is a better candidate imho mostly because of the explosion in its use case in the past decade, especially due to data science/AI fields.
I have a hard time going to another language that requires appending semicolon at the end of each line, dealing with curly brackets, and requiring a bunch of middlelayer tooling.
I'm willing to bet that I can train someone without any coding experience in Python. It's built for readability and very accessible. Javascript? No way I would introduce them until they get some handle. PHP? Not unless I am trying to create a sweatshop.
Python was started from the educational side of computer science. As such its core concepts and architecture are solid.
PHP was started more as a quick hack by a single developer just playing around. More and more stuff got tacked on and the result was a steaming mess. It's been busy fixing its conceptual mistakes since version 3/4.
I doubt it, maybe some hyper genius, you need to try and see how someone new to programming understands thing. Stuff that is super obvious to us is just unclear for a new person.
Oof - I find Python very ugly to read. Give me semicolons and curly braces any day.
I find Python quite easy to read but I still prefer C-style code without significant whitespace. Those braces make it far easier to spot block level errors, especially when using some form of auto-indent or a linter. Semicolons are less important - I hardly ever concatenate lines of code - but they don't bother me either.
JS has grown a great many tools, libraries, and features, but as language semantics go it’s hard to say that primordial JS was seriously broken anywhere. Coercions, maybe. It’s not a language I can love, but it’s one I can accept.
PHP’s lack of coherent style and the persistent thrill of not knowing which horrible errors it’s willing to silently swallow and proceed, on the other hand, are (were?) much harder to tolerate.
Reddit’s r/lolphp has some “great” memories of many of the shortcomings (most of which are historical now fortunately). My favorites are probably the randomly long and short function names, due to length being used for hashing, and DATE_8601 not being compatible with ISO-8601.
EDIT: Don’t want to start a flamewar, it really has improved over the years. Nonetheless, it has a less than bright past.
http://phpsadness.com/
Let’s be honest, both language had place for improvements (other languages didn’t leave as much to be desired), and fortunately both became quite usable nowadays.
I agree if you include the TypeScript scaffolding
And why not?
TypeScript really is a feature of JavaScript in many ways.