4 ms·
All of a sudden, perfectly working JS becomes "legacy" code due to the introduction of a new feature in the spec. There's that saying, only the software industr
by daliwali 10y ago
All of a sudden, perfectly working JS becomes "legacy" code due to the introduction of a new feature in the spec. There's that saying, only the software industry is more driven by trends than the fashion industry.
- pitaj 10y agoThis new feature allows you to make code more structured and maintainable. Of course people are going to use it, and even change old code to use it. `Array.forEach` and `Object.keys` were new features in ES5, should people just leave their old `for` loops anyways? Refactoring old code is a good way to keep your codebase consistent and maintainable.
- daliwali 10y agoHahaha, no. Every time the argument for "maintainability", or some other subjective quality like "readability" is mentioned, another question must be answered "to who?" The class keyword was added a few years too late to accomodate the horde of desktop Java/.NET developers moving to the web platform, who simply did not grok prototypal inheritance. Now they don't have to. >`Array.forEach` and `Object.keys` were new features in ES5, should people just leave their old `for` loops anyways? Emphatic yes, people should keep using their "old" loops. They do less and are much faster.
- deleted 10y ago[deleted]