3 ms·
> And this was the original plan — the “other language” was ... In short? mis-designed. JS was fora use case, and have become more and more for other uses cas
by mamcx 5y ago
> And this was the original plan — the “other language” was ...
In short? mis-designed. JS was fora use case, and have become more and more for other uses case (even backend!). This is also the problem with html, css, dom.
Plus, some WATs are part of rushing it, and others for mismatch in the uses cases.
- handrous 5y agoI think the fact that it features, very prominently, an OO model (prototypal) that's pretty firmly in "please, never actually use any of the notable features that differentiate this model from others" territory is enough to fairly label it mis-designed, however far it's come. It's no accident that prototypal-heavy JS is damn near at the bottom of paradigms for approaching JS programming, beneath a bunch of others, OO or otherwise, that brush right past it, pretending it's not there. I'd point to not making async calls synchronous-to-the-caller by default as another pretty bad design mistake. The way so many JS files start nearly every line (correctly! This isn't even counting mis-use of the feature, which is also widespread!) with `await` is evidence of this, and so's all the earlier thrashing before we had `await` to deal semi-sanely with this bad design decision. The original scoping system was just bad. We have better tools to make it suck less now, but it was designed wrong originally.
- catlifeonmars 5y agoI’ve thought about what JS would look like if instead of await, the language would await by default and expressions would be explicitly deferable via some other keyword (like “defer”).