I'd bet good money you could go back in time and swap out JS with just about any relatively high-level language (maybe the original Scheme plan, maybe Java, literally anything with managed memory) and that language would enjoy JavaScript's popularity today.
JavaScript's ubiquity has everything to do with its monopoly in the browser, and nothing to do with any specific features of the language.
But Javascript has grown into a language that makes some solid and unique trade-offs including its simple single-threaded concurrency, modern language features, async-everything, first-class Promise, and Typescript.
"Javascript sucks and people only use it because they have to" is both wrong and boring. We, as a community, have to stop trotting out this tired comment any time a submission has the word Javascript in it.
There's a pretty big gap between "this tool is so bad it's impossible to use" and "this tool is quite bad but determined people can still make it work"—my experience is that the latter is totally sufficient for a tool to go mainstream, but it can still be fair to call it the wrong tool :P
"Essentially the entire globe" is way off. In the web world, yes, and some niche people doing stuff with JS because they can, maybe. I don't think you find much, if any, of it in cars, planes, telecom, robotics and other areas of computing. Correct me if I'm wrong, though.
And just because something is ubiquitous doesn't mean there doesn't exist anything better.
Can any situation that exists in the world be bad? Yes, indeed. If anything, the ubiquity of JavaScript makes its shortcomings a worse problem than if JavaScript weren't so widespread.
OkayPhysicist|2 years ago
JavaScript's ubiquity has everything to do with its monopoly in the browser, and nothing to do with any specific features of the language.
hombre_fatal|2 years ago
But Javascript has grown into a language that makes some solid and unique trade-offs including its simple single-threaded concurrency, modern language features, async-everything, first-class Promise, and Typescript.
"Javascript sucks and people only use it because they have to" is both wrong and boring. We, as a community, have to stop trotting out this tired comment any time a submission has the word Javascript in it.
tikhonj|2 years ago
sodapopcan|2 years ago
And just because something is ubiquitous doesn't mean there doesn't exist anything better.
tshaddox|2 years ago
joshspankit|2 years ago
Businesses/industries being huge does not indicate whether a tool/method/approach is high-quality.
dahfizz|2 years ago
Terminal apps, trading algos, operating systems, compilers, embedded, databases, etc etc.
JS is never the best tool for the job. But sometimes, it's the only one.
kamma4434|2 years ago
adamnemecek|2 years ago