back

by masswerk·11y ago·view on hn ↗
JS used to be a language that was easy to understand. Once you grasped the concept of how object references and scopes were handled (which everyone could who invested a few days in understanding the language and read the specs), you were able to understand any of the user-land implementations. Now there are popping up more and more essentially parallel paradigms, mainly to pull some of the user-land implementations back into the language. As a side effect, the language eventually becomes more and more complex, and, as more concepts are integrated, it becomes less obvious, on what kind of tradition a new feature builds. (E.g., there are now two notions of scopes and two notions of object construction and inheritance — and I'm quite confident that we'll see some new features borrowing from both.) As in CISC vs RISC, there are valid arguments on both sides. But there's a lot of cultural change involved, when venturing from a quite spartanic but powerful definition of the language to a multiple concepts definition. Ironically, it will be the user-land implementations, again, that will force everyone into the new notion of the language and there will be no option of avoiding the migration (like sticking to C and avoiding C++, as some have preferred to do in the past). Libraries will be still with us, but it will be more difficult to understand what's really going on, and eventually, the dependency on them will grow. Still, opinions are opinions and there are probably more than two on it as far as developers are concerned.

But there's another side to it: JS is essentially a language to write code to be run on a foreign machine with quite a vague permission to do so. There's an interest in understanding what some piece of code is actually doing, in order to evaluate, whether the permission should actually be granted or not. (E.g., I might prefer not to use a WebApp, if I find me tracked in a way that doesn't conclude with the nature and value of the service. Even, if a free service, the price might be too high. Or, I could find me integrated into some kind of ad-hoc P2P network [WebRTC] that is far exceeding my planned investment in resources and which's use might not converge with my intentions.) The actual chance of doing so correlates with the learning curve of the language used. IMHO this is quite a strong argument for using a language that is both high level (as opposed to Emscripten + ASM) and of a quite scarce formal definition.