What is your problem? If you don't like JavaScript don't use it. I think it's a great language that allows me to do lightweight OOP and FP programming. Since you don't like it just use another language.
JavaScript is not a good language. It was in the right place at the right time (the browser in the early 90/00s) The way it does dynamic typing is insane, error handling is hot garbage, and the GC nature of it means you can get unavoidable stop the world latency while the GC runs.
You can certainly do a lot with JavaScript and there's a massive echo system around it. But that doesn't mean it's good.
> Have you seen the horrible mess of web development caused by JS platform taking over backend and mb of js files just to write a text to a DOM element?
Deno is one of the pioneering projects (via https://fresh.deno.dev/) pushing SSR to the maximum so we don't need MBs to render DOM elements... unless you know, you want any sort of interactivity which every single client-facing SaaS app ends up needing (for which hydrated 'islands' are used only when necessary).
Unless you remove the need for desktop-style interactivity on the internet JS is never going away. Maybe WASM will help here (w/ even worse Web standards), but I could reverse your same critique and point at all the horror-show UIs backend devs have built using backend-style code.
I don't personally use JS server-side but I get why people do and it's not the language/runtimes making apps slow. Backend JS adoption is heavily informed by the dominance of JS on the client side, ease of hiring, and an effort to keep data structures DRY.
> Enough of OOP that has horrible.
OOP is not a requirement in JS and I rarely see it being used heavily these days. Nothing like Java or some awful Ruby projects I've seen.
JavaScript isn’t going to perform as well as C++ or Rust, or at least not consistently, but V8 does pretty well for a scripting language. It has definitely passed “good enough” and for many people, that’s good enough. There are websites are written in Python, after all.
You can drop into WASM to get more speed without performance cliffs, or for Deno itself, they use Rust.
The browser reinforces javascript ecosystem dominance. We are not going to deprecate javascript in the browser because that would break the world. The way forward is improving wasm, and improvements there are coming, but even so the performance is roughly comparable to javascript in all of the benchmarks I've seen.
Even if we get to a place where wasm performs much better than javascript, javascript will remain dominant due to the fact that it's the default. It is what it is, we're stuck with it short of something like AI changing everything.
Have you actually used Deno? Typescript/Deno is a whole different beast to NPM/JavaScript.
Yes there are still areas of JavaScript that suck, e.g. the whole prototype system, and the standard library (how they managed to fuck up String.replaceAll() is anyone's guess), but the overall package is actually pretty good!
Way better than Python for example (though that isn't saying much).
You can use any other language on the server side. What would be good is if wasm had full access to the DOM instead of through some JS layer. Or maybe a new browser is created that did away with JS altogether. It's always been my dream.
But there are alternatives. I would reach for Go. I’m not great at it but good enough that I know I can code up a server. And I know it will be be stable and simple to deploy - upload the binary and run it via systemd.
Are these really JS problems or problems with so many layers of abstraction? I don't really see any specific critic of JS here, just a lot of vague concerns.
glutamate|2 years ago
patmorgan23|2 years ago
You can certainly do a lot with JavaScript and there's a massive echo system around it. But that doesn't mean it's good.
JimDabell|2 years ago
Which other languages work comparably well in the browser, with similar functionality but without large runtime / standard library downloads?
dmix|2 years ago
Deno is one of the pioneering projects (via https://fresh.deno.dev/) pushing SSR to the maximum so we don't need MBs to render DOM elements... unless you know, you want any sort of interactivity which every single client-facing SaaS app ends up needing (for which hydrated 'islands' are used only when necessary).
Unless you remove the need for desktop-style interactivity on the internet JS is never going away. Maybe WASM will help here (w/ even worse Web standards), but I could reverse your same critique and point at all the horror-show UIs backend devs have built using backend-style code.
I don't personally use JS server-side but I get why people do and it's not the language/runtimes making apps slow. Backend JS adoption is heavily informed by the dominance of JS on the client side, ease of hiring, and an effort to keep data structures DRY.
> Enough of OOP that has horrible.
OOP is not a requirement in JS and I rarely see it being used heavily these days. Nothing like Java or some awful Ruby projects I've seen.
pjmlp|2 years ago
skybrian|2 years ago
You can drop into WASM to get more speed without performance cliffs, or for Deno itself, they use Rust.
unknown|2 years ago
[deleted]
suby|2 years ago
Even if we get to a place where wasm performs much better than javascript, javascript will remain dominant due to the fact that it's the default. It is what it is, we're stuck with it short of something like AI changing everything.
IshKebab|2 years ago
Yes there are still areas of JavaScript that suck, e.g. the whole prototype system, and the standard library (how they managed to fuck up String.replaceAll() is anyone's guess), but the overall package is actually pretty good!
Way better than Python for example (though that isn't saying much).
cdelsolar|2 years ago
msie|2 years ago
AtNightWeCode|2 years ago
jweir|2 years ago
But there are alternatives. I would reach for Go. I’m not great at it but good enough that I know I can code up a server. And I know it will be be stable and simple to deploy - upload the binary and run it via systemd.
colordrops|2 years ago
msie|2 years ago
Cyberdog|2 years ago
Your username is "msie." Do you remember what Microsoft Internet Explorer 6 did to the web?
IshKebab|2 years ago