by user3939382 · 3y ago · 0 comments
There's a lot more to developing large projects than your own code. What about the ecosystem? What about everyone else's code? JS IMHO is just a complete mess. That's not at all to belittle the size of the problems it is tasked with solving, which are hard and complex. The difficulty is precisely why the right tool for the job is something that really insists on some level of correctness, in the vein of what rust tries to do at the systems level.
This is all IMHO and there's a lot of room for different opinions here, but I'm guessing we have a consensus, even among JS's biggest advocates, that it can't be described as "insisting on correctness".
Unfortunately the more relevant follow-up question might be: okay it's the wrong tool for the job, so what? It's what we have.
It's far from being "the standard language for the browser", but the browser doesn't know that.
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.
If you look at the post I replied to, I was countering the idea that "JavaScript must be good because lots of people use it". JavaScript is popular today because it was popular yesterday, and the roots of that chain is JavaScript was popular in late 90's because it was your only real choice.
I've used actually bad languages professionally. JavaScript today is merely mediocre, thanks to nearly 30 years of fixing. But it's still held back by its roots of being kinda awful. There are unambiguously better choices for non-browser codebases, unless "whatever is popular" is a primary driver.
I'm not sure how someone's statement of personal motivation can be wrong? Here is mine: JavaScript doesn't suck. However I personally do "only use it because I have to", i.e. because of the browser support. Nothing more. Where's the "wrong" in that? I'm not lying to you. I promise.
And JavaScript isn't alone! There are many more languages I think are simply okay, and don't suck. Several of those I have used professionally because I had to, but would not choose them for a personal project. I would also use them if they were all a web browser ecosystem supported.
I totally get this sentiment because I feel it myself with some topics. But to give you another perspective: the comment and issue keeps coming up because in the eyes of some (many?) the problem hasn’t been solved.
It’s like I’m getting pin pricked every day so I keep complaining about it.
And just because something is ubiquitous doesn't mean there doesn't exist anything better.
Businesses/industries being huge does not indicate whether a tool/method/approach is high-quality.
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.
what I really detest about javascript is its inability to say no to the programmer (most dominantly typing woes), and how incredibly late it got some super basic features for code organization. private class members (in a way that isn't syntactically insane) got added to the language figuratively two days ago. what the hell?
this was pretty much the result of the XHTML debacle as well, and I know the reasons why that went down the way it did, but it's kind of weird to me that We Just Can't Have Enforced Correctness In The Browser.
1. Its maintenance/activity appear sporadic at best. 2. It's inscrutable. Whenever I've had issues, I don't have any idea even how to approach solving them. Half the time they reference in-depth mathematical terms that just are not relevant to anyone who isn't implementing the language 95% of the time. 3. The tooling often just... doesn't work. I'll go to run a commend given in the official tutorial, and it fails in a way that is just beyond me, as an experienced engineer.
TBH, I'd really love to use it. I've been finding myself using `fp-ts` on many of my projects for just such a reason, and have even set up `unplugin-auto-import` to automatically detect and import those modules, so it's like I have more in my stdlib. I've even thought of making a true language out of these primitives.