by lenkite · 2y ago · 0 comments
No, it wouldn't matter how terrible or in-expressive the language is - once it got rolled out to the web browser, then it would never be replaced. That is why you have WASM nowadays - you can add new stuff but never replace stuff.
Browsers did support multiple programming languages with the language attribute on the script tag. This is how Microsoft added VBScript to IE.
So like Shockwave, or Flash, or Silverlight, or Adobe AIR, or java applets, or the entire ActiveX ecosystem or...
We literally only moved things to javascript after Google spent a billion dollars writing a hyperoptimized javascript engine that has to make a pact with the devil (pretty much every javascript based exploit of computers relies on the fact that it is leakily compiled JIT to machine code, if javascript required less optimization to be useful, the internet would be a less exploitable place) just so that you could read your email in a web browser in a slightly less ugly way.
It also required several doublings in normal person computing power to be usable, and literal armies of 20 somethings writing in a couple giant abstraction layers that had to reinvent the world to do anything useful. It is still the primary burner of average person computing power, to run a million lines of javascript to do the exact same shit we did in the 90s with a 386.
Javascript should be seen as a systemic failure. If it's supposed to be "assembly for the web" as it seems to be treated now, then it needs to be VASTLY more efficient to run.
Yeah you complain about JavaScript but listed 6 objectively worse technologies. Clearly the best option won.
Browsers are ultimately the write-once-run-everywhere platform that everyone was trying to develop for decades. The only successful implementation of that idea. This is a case of worse is better.
And I think you're actually overselling the problem -- I have plenty of vintage machines and this text box in HN has more functionality than word processors had in the 90s. Here we are safely using literally an infinite number of apps that never have to be installed. It's an amazing achievement.
The word you are looking for is subjectively. Objective measures need to be specific.
> Clearly the best option won.
Although, if Konquerer had implemented its own Flash renderer back in the day, there is a decent chance that Flash would have won in the end. Flash failed only because there was, for all intents and purposes, only a single implementation and a notable individual didn't want to have to rely on it, breaking unanimous support.
> The only successful implementation of that idea.
SQL is the only successful implementation of that idea.
The browser has fallen quite short of any kind of success in that regard. For example, studies that have looked at iPhone users suggest that 80-90% of their "internet time" is spent in apps rather than the browser.
As an aside, I always figured that the "WASM" of databases would come some day. With SQLite recently publishing details about its bytecode engine, perhaps that is looking more realistic?