Hacker News new | past | comments | ask | show | jobs | submit login

> If JavaScript wasn't as expressively powerful as it is, it would have been replaced a long time ago.

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.




I disagree. If JavaScript was objectively limited, one of the browser makers would have just added something else and if it was good enough it would spread to others. Just like other browser technologies (for example, xmlHttpRequest). In a way, that's what happens with JavaScript right now. It continues to evolve.

Browsers did support multiple programming languages with the language attribute on the script tag. This is how Microsoft added VBScript to IE.


>If JavaScript was objectively limited, one of the browser makers would have just added something else and if it was good enough it would spread to others.

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.


> So like Shockwave, or Flash, or Silverlight, or Adobe AIR, or java applets, or the entire ActiveX ecosystem or...

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.


> objectively worse technologies.

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.


> The word you are looking for is subjectively. Objective measures need to be specific.

If you're going to be pedantic, you should at least try and be correct. Objective just means based on facts where subjective is based on opinions or feelings. Just because I didn't enumerate all the ways in which those technologies are objectively terrible, doesn't mean they are not.

> 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.

But even if that was the case, we'd still be using JavaScript.

> Flash failed only because there was, for all intents and purposes, only a single implementation

...and that implementation was terrible. Full of security flaws, bugs, and insufficient investment from Adobe. But a single closed-source implementation is also a perfectly good reason why it objectively terrible as well.

> The browser has fallen quite short of any kind of success in that regard.

If Apple was not specifically crippling browser potential on their platforms, it might be more. But either way, the actual success of the iPhone was entirely based on the browser (the first version didn't even have apps). The web is what makes any alternative operating system viable today -- whether that OS is iOS, Mac OS, Android, WebOS, ChromeOS, Linux, etc.


> Objective just means based on facts where subjective is based on opinions or feelings.

Indeed, and the assertion made was based on opinion or feeling. There is no objectivity in the assertion.

> But a single closed-source implementation is also a perfectly good reason why it objectively terrible as well.

While I must share in your opinion, this again is not measured objectively. You just got finished defining the word... It is quite likely that at least someone at Adobe enjoyed it being a single closed-source implementation for a long, long time. "Terrible" is always an opinion.

> the first version didn't even have apps

Incorrect. While it did not support third-party apps (officially, at least; it didn't take long to see them added unofficially), the device was chock full of apps written by Apple.


> That is why you have WASM nowadays

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?




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: