Hacker News new | ask | show | jobs
by naikrovek 1395 days ago
I am surprised every day at how much raw human effort has gone (and continues to go) into making JavaScript into a good language, when at most 1/20th of that effort could have been used to simply replace it with something that is good to begin with.
1 comments

The positive interpretation is that this is an example of Gall’s law: https://en.wikipedia.org/wiki/John_Gall_(author)#Gall's_law

Today’s JavaScript works because it has gradually evolved from the primordial JS which (just about) worked; at each stage in the chain it’s seen real-world usage as an in-browser language.

The alternative would be to build something better from scratch -- but that never works, says Gall’s law -- or to take some other battle-hardened language (C? Java? Python?) -- but trying to adapt those to work well in the browser would hit just as many technical and political barriers as JS did in becoming a decent general-purpose language.

Javascript has had zero barriers in becoming what it is, specifically because people are afraid to attempt to unseat it. there has never been an adult in the room willing to ask “is spending several hundred thousand person-years on this hack of a language better than starting over with something that is more thought out?” Of course it would be better to replace it, especially so in the early days when people saw what was coming.

everyone just continues doing what they are doing on the assumption that either JS is the best that humans can come up with, or that it’s too difficult to unseat it. both are ways of saying “i don't want to think about that problem right now.”

so then someone made the simultaneously laziest and most expensive decision ever: put JS on the server, too. now the code serving the client and the client itself get one thread each. “gosh, performance isn’t great here, but i don’t want to think about that, i have a sprint goal.”

it is only recently that WASM became a thing, and adoption seems slow. it has only succeeded because it did not try to usurp JavaScript’s position, and even requires JavaScript code to interact with the page content or the user in any way. if you can’t beat ‘em, or don’t want to try, join ‘em.

JS has hit zero barriers and has never been strenuously challenged at all. if it had, it would be gone. everyone just keeps throwing money at it because they don't want to think about how awful it is.

Only Google attempted it with Dart, and then they got tired and gave up, because the team was (presumably) minuscule compared to the team working on JavaScript in the same effing browser.

I don’t think your reading of history is correct at all. There were plenty of attempts to unseat JS in the browser - ActiveX, Flash, Java, Dart.

Only Google attempted it with Dart, and then they got tired and gave up, because the team was (presumably) minuscule compared to the team working on JavaScript in the same effing browser.

Funnily enough it was the same team! Lars Bak led a small team to build V8, and then when that was a big success, he had enough clout within Google to design a new language that could improve on JS, so he took most of the same team and they created Dart.

ActiveX, Flash, and Java all supplemented Javascript. none attempted to replace it. they all did things that could not be done with Javascript at the time.

only Dart attempted to replace it.

> Lars Bak led a small team to build V8, and then when that was a big success, he had enough clout within Google to design a new language that could improve on JS, so he took most of the same team and they created Dart.

How many people (original team or not) continued to work on V8? I don't know, but it felt like Dart had about 5% of the workforce that V8 did. If so, there was little chance they could have ever caught up to V8 on any measure in the short time Dart existed in Chrome as a DOM-manipulating scripting language.