I think JavaScript’s core foundation is changing because its use cases have rapidly changed. Like C++ or PHP though, it likely has a lot of legacy cruft.
Are any Ruby experts able to chime in if its language/runtime changed much after Rails hit the scene?
Keep adding rules and break the compatibility of strict code, or forget about it and live with current problems forever?
What things going into core do you think should be a separate framework?
But a flawed language cannot be made non-flawed while keeping backwards compatibility... E.g. JS has now two different ways to write functions, with slightly different semantics.
>What things going into core do you think should be a separate framework?
An example would be async/await and generators, both which are just a special cases of coroutines. If JS would have coroutines, then these two would just be coroutine libraries.
Sure it can. Just introduce new syntax and discourage use of old syntax, ideally with tooling. For example, `var` is disallowed by any popular lint config, and for most practical purposes, it doesn't exist in JS anymore. The execution environment will still handle it, but it's not an available option when writing code in any professional or non-professional project I work on (because it won't pass lint).
Plenty of languages do this: Java raw types, Python old-style classes, goto in lots of languages. Python actually did a breaking change to remove old features, and it's a good example of how breaking changes can cause much more trouble than you might expect.
That is surprising to me. I work with code that is more than a couple years old all the time and I would guess most people do to.
Just 2? More like 9:
* function expression
* function declaration
* arrow function (single line, single param)
* arrow function (single line, multiparam)
* arrow function (multiline, single param)
* arrow function (multiline, multiparam)
* object shorthand
* class declaration
* class expression
async/await could be implemented with just generators, and were so implemented in ES6; async/await was added to the language because it was convenient. A language without full coroutines is fine.
1. The language design is flawed. That is, the desired functionality requires changes to the core language, because it can't be made from existing building blocks. The fundamental language constructs are not universal enough, so new functionality will always require "just one more" special case in the language itself.
or
2. People are shoving things into the core language, that should rather be implemented as a library/framework.