4 ms·
I don't get the sentiment about JS. Where all the hate is coming from? Maybe it's just confusion. People hate SPAs, but talking about web. IMO web and SPA are t
by finchisko 7y ago
I don't get the sentiment about JS. Where all the hate is coming from? Maybe it's just confusion. People hate SPAs, but talking about web. IMO web and SPA are two different things. Maybe overuse of JS on web sites is problem, but A in SPA stands for "application". And applications written in JS are perfectly legit to me.
- goatlover 7y agoOne complaint is developers defaulting to using SPAs for building traditional websites which aren't apps, recreating the functionality that modern browsers are already good at, and there's plenty of good backend frameworks that have been around for while, where content can be loaded quickly, so a full page load isn't a big deal as long as it doesn't have a bunch of JS it has to wait on.
- altfredd 7y agoWhat is there not to get? Javascript in browser simply sucks as platform. 1) No memory limits (technically, there is a limit, but it is much bigger than, say, app heap limit on Android) 2) Background tabs can use setTimeout() to indefinitely run code long after user left them 3) Websites can start background processes (Service Workers) without user oversight. Users can't prohibit that or kill them via easily available means. 4) Applications are non-optimized by default, need massive CPU resources for JIT-compilation 5) Rendering a page with five sentences requires executing tons of said unoptimized code. 6) No permission system for majority of things. All important user controls have to come with browser add-ons. 7) Applications can update themselves anytime without user consent 8) Most web apps do not work offline 9) Everything is tied to proprietary web services with overarching surveillance and dodgy EULAs...
- Khanhanhan 7y agoShouldn't you just write that "browsers suck as a platform for running JavaScript"?
- marcus_holmes 7y agotake literally any language, and there's a laundry-list of complaints about it. there was a whole thread here a few weeks ago hating on SQL (a battle-tested veteran of ~50 years) and giving a laundry-list of "things that are broken in SQL" there are routine threads discussing the manifest flaws of Go, and why everyone should switch to Rust/Elixir/Nim/whatever the newest flavour is. no language is perfect (not even LISP), every language is a bit broken in some ways. JS is a great language for its role. It allows newbie coders to write some godawful web code that works!!!1!1!! while they're learning (without having to understand a lot of CS), and veteran coders to write some really elegant code if they want. Learning to use JS powerfully has been a great education in coding for me. I'm still not using it as well as I could be using it, and I like that it has depths still to discover.
- krapp 7y agoEvery item in your list describes a problem with the way browsers are designed, with the way the web works, or with the standard practices and incentives of web development culture, and all of them would likely still exist were javascript replaced with any other language. It's ironic that JS as a language is hated to the point of near derangement on HN while being the least relevant component of the problems people here have with the modern web.