4 ms·
What 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,
by altfredd 7y ago
What 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.