4 ms·
While I agree there is some level of mass psychosis surrounding JavaScript, I think there is a lot more nuance to what's going on. I don't think the onslaught
by apeace 10y ago
While I agree there is some level of mass psychosis surrounding JavaScript, I think there is a lot more nuance to what's going on.
I don't think the onslaught of new frameworks and transpilers has been due to JavaScript's weaknesses as a language. I think it has been due to the rapidly changing landscape of _what users expect from web apps_ and the corresponding changes we need to make in the way we develop.
FRP is a great example: many of the recent shiny new toys have been different approaches to implementing this concept in the browser (React, Vue, Elm just to name a few). But this isn't just a trend because web developers are fickle, it's a trend because web applications are growing in size and complexity, and we're all sick and tired of implementing the same boilerplate to make the value of an input get assigned to some variable, or to make the changing of some variable trigger a change in the DOM.
I think there is some overlap, but in general conflating changing development practices with the problems of JS as a language, is drastically over-simplifying it.
Where I do see a psychosis is in the choice of JS as a configuration/build language. Systems like Gulp and Grunt make no sense to me. Why would you want a build script to be in a language with asynchronous I/O and callbacks? Build scripts are always one step at a time, feeding the result of one thing into another. JS just doesn't fit that kind of workload. I see that as a psychosis, and as the result of more junior devs wanting to choose a tool they are more familiar with, as opposed to the one that does the job better.
EDIT: Another example of a psychosis has been recently discussed on HN: the choice of embedded web browsers for implementing text editors[0]. Again: other than 'psychosis' mixed with the desire to pick a more familiar tool, what makes a web browser a good tool to build a text editor? Nothing!
[0] https://news.ycombinator.com/item?id=13940014 https://news.ycombinator.com/item?id=13940014
- smt88 10y ago> I don't think the onslaught of new frameworks and transpilers has been due to JavaScript's weaknesses as a language. I whole-heartedly disagree. TypeScript, Flow, and Babel are all ways to address JavaScript's weaknesses. You could argue Babel is a result of out-dated browsers, of course. But fragmentation of targets is certainly an issue of the language -- earlier versions didn't have to be so poorly designed. Would we have all these transpilers if we were using a fully-formed, general-purpose language for the web from the start? No. If JS had a type system, there would be no TypeScript, Flow, NativeScript, PureScript, etc. If JS had a sane way to handle parallelism from the beginning, Babel wouldn't be nearly as useful. Yes, it's true that JavaScript wasn't designed for what it's being used for now. That doesn't mean it's a good language (or ever was).