>
Basically every site you visit asks you to run untrusted code to view it now.Javascript didn't do that. The needs for ads and analytics are doing that. You know what people used before Javascript? Flash and Java. You want untrusted code running on your system, you're going to get very much untrusted code running on your system.
The current situation is a huge improvement over that. No, Javascript isn't making the internet hostile; it's making it useful. Unfortunately, ads are making the internet hostile … but they're also making it profitable, thus… useful. YMMV. People are working on alternatives, it's not an easy problem to solve.
> It's a hastily thrown together language that was rushed out the door by a Netscape engineer long ago, and it shows.
Ok, we're beyond that now. Would the web be better had we had Lua from the get go? Maybe. It'd also be 1-indexed. Would it be better had we had Python? Well, we'd be stuck with shitty lambdas. You know, Javascript is an ok shell for a language that has received a lot of work since.
There is no programming language on earth that can compete with the amount of effort thrown into improving Javascript, ever since that "Netscape engineer rushed it out of the door".
> The 'ecosystem' is like swamp right now, at least to me
It's not. Again, 15 years of Python speaking here. Javascript's ecosystem is active, but the most popular frameworks and solutions are years old. Typescript is from 2012, React from 2013. Both have rock-solid APIs and backwards compatibility. Other popular frameworks also take this stuff very seriously. And the older "progressive enhancement oriented" frameworks such as jQuery are over a decade old and your 2007 code still most likely works with them.
The JS ecosystem is what you get when you lower the barrier of entry to an extreme. There's a lot of crap in it, but you're supposed to do your due-diligence with any dependency, not just in that one language. When I pull in a new library in Python, I look at its codebase first: Is it clean? Maintained? Tested? Popular? You should do the same with JS dependencies as well, you just get more choice; more chances for your problem to already be solved.