3 ms·
When JS came out, it was poorly designed, but nobody cared because we used it only to make snowflakes appear on the web page. Then MS gave us AJAX and 37 signa
by sametmax 9y ago
When JS came out, it was poorly designed, but nobody cared because we used it only to make snowflakes appear on the web page.
Then MS gave us AJAX and 37 signals made it popular, until apps like gmail made it so mainstream it was impossible to go back to old static pages.
But it was too late. The shitty language we had was the only one available everywhere to do dynamic web pages now.
IE would not move, and Firefox and Opera were the underdog, spending their resources on more important things. So nobody tried to implement a better existing language.
When Google faced the challenge of creating chrome, they had to be compatible. So instead of implementing a better language, they also used JS, and injected millions of dollars into making the V8 so it has decent performances.
After that, JS was usable, and so we moved on.
- kbenson 9y ago> apps like gmail made it so mainstream it was impossible to go back to old static pages Google maps. When Google maps first came out as a beta/preview and I first loaded it up, it was magic. Not magic as in the "this is wonderful" sense (it was) but in the "any sufficiently advanced technology is indistinguishable from magic" sense. I truly didn't understand how what they were doing was possible for the first few minutes. I'm pretty sure the feeling was the same with all the other programmers and sysadmins at the ISP I worked at. Gmail might have clued a lot of people in as to how you could make webpages more dynamic, but Maps truly showed us how you could make a web application every bit as fluid and usable (if not more so) than a local one in the right circumstances.
- petre 9y ago> So instead of implementing a better language, they also used JS They did implement a better language, Dart. But it was too late, like you said. Maybe we'll have a change of using it for mobile apps with Flutter.
- sametmax 9y agoDart came way, way later. And it was a new language, while they could have just used an existing one. They could have implemented lua, ruby, Python, anything with a good track record. With the millions spent on V8 with those geniuses working on it, can you imagine how fast one of those language would have become ? The tooling it would have had ?
- kjksf 9y agoActually, Google tried to make Python faster, with Unladden Swallow project. They failed miserably. And several other projects failed miserably at the same thing as well. Either way, speed was not the main reason they created Dart. Dart was designed for writing large web apps. Dart's top design constraints was good interop with JavaScript meaning transpilation of Dart to decent JavaScript and consumption of existing JavaScript libraries from Dart. I repeat: top design goal. You can't take a language (be it Python, Ruby or Lua) that was not design with that constraint in mind and magically make it work. There are transpilers from those languages to JavaScript but they are toys. You just can't reconcile Python semantics with JavaScript semantics in a reasonable way. So they did the next best thing: they designed a better Java/C# while keeping JavaScript interop as a priority. Now Dart is morphing because the top design goal is to make it the best language for cross-platform mobile (i.e. iOS and Android) apps, which requires different trade-offs.
- skolemtotem 9y ago> You just can't reconcile Python semantics with JavaScript semantics in a reasonable way. That's actually an interesting claim, and so I would really appreciate if you could provide a (possibly informal) proof that justifies it?
- sametmax 9y agoPypy is proof that you can speed up Python considerably. And it's written in Python. Imagine what could be achieve if one would write something like that in, say, Rust ? My guess is that they didn't invest anywhere near the resources on unladden shallow (which was probably a side project) than they invested on chrome vm (which was a core project). Actually, I spend quite a lot of time on the Python mailling list, and here you can see they regularly find things to improve, perf wise. They just have terribly low resources. I've rarely seen a project as popular as Python, used by so many rich huge corporation, which such little resources actually. It's heart breaking.
- deleted 9y ago[deleted]