Hacker News new | ask | show | jobs
by jfengel 1890 days ago
That's how it was originally designed. The main use case was quickie animations and simple interactions on the web. Web Apps were not a thing. That was all supposed to be done in Java.

It didn't turn out that way, and a ton of stuff has been backfilled into Javascript to make up for that: modules, classes, just-in-time compilers, frameworks, etc. This was all done in a somewhat half-assed fashion, leaving a ton of warts and buried land mines.

Javascript suffers from being too flexible (a thing it inherits from its Lisp-like origins). It's easy to work around problems, so everybody does. Differently. Those solutions come and go, and code written for one becomes Linear B.

By the time you get to Typescript you have a decent language with the possibility of code that can be read, not just written. But the effect is an enormous language and even enormouser language ecosystem. Whole paradigms have come and gone -- jquery, Angular 1, a host of old bundlers -- but of course they never disappear. New code is still written, and only maintainable by the people who wrote it.