top | item 35252809

(no title)

eddsh1994 | 2 years ago

Can it really be called the wrong tool when so many huge businesses and essentially the entire globe are powered by it? It’s certainly worked imo

discuss

order

OkayPhysicist|2 years ago

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.

hombre_fatal|2 years ago

That was once true.

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

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

sodapopcan|2 years ago

"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.

tshaddox|2 years ago

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.

joshspankit|2 years ago

You don’t need excellence to have a profitable company, and in fact once you get to about 80% of excellence you make less profit the higher you go.

Businesses/industries being huge does not indicate whether a tool/method/approach is high-quality.

dahfizz|2 years ago

It powers the web, because there are no other options. If JS was good, people would use it for other things.

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

Sure. Multi-megabyte download that display a spinner while fetching data to display a web page. But hey, billions of flies cannot be wrong