3 ms·
One advantage of vanilla JavaScript is its long-term stability. A developer can often revisit code written years ago, make a quick tweak to add a feature, and m
by mikedelfino 2y ago
One advantage of vanilla JavaScript is its long-term stability. A developer can often revisit code written years ago, make a quick tweak to add a feature, and move on. It will probably feel as familiar and straightforward as it did back then, with new APIs and syntax improvements adoptable in small steps. By contrast, a project built on the framework of the moment might not age as gracefully; the build process can feel outdated or cumbersome as standards evolve. Of course, if you’re able to keep everything up-to-date, it’s less of an issue, but that’s not always feasible. And while vanilla JS may not be ideal for a project scaled to 100 million users, it’s a practical choice for many situations.
- _puk 2y agoHave you seen vanilla js lately? It's moved on massively as a language, picked up many, many new paradigms. Going back to code more than a few years old and your newer devs are going to be asking "what's all this var nonsense"?!
- KronisLV 2y agoNot just that, but the tooling has also evolved and changed. Good luck trying to get an old project with old versions of Yarn and Gulp working well, where trying to update either breaks the build but using anything other than var confuses the tooling. Provided that you have a build step of any sort (e.g. minifying the assets) and people picked whatever was popular at the time of the project being made.
- nicoburns 2y ago> By contrast, a project built on the framework of the moment might not age as gracefully; the build process can feel outdated or cumbersome as standards evolve For frameworks in general perhaps, React in particular has been fantastically stable since very shortly after it was first released, which is over 10 years ago now.
- madeofpalk 2y ago> By contrast, a project built on the framework of the moment might not age as gracefully; the build process can feel outdated or cumbersome as standards evolve Why can this not be true for 'vanilla js'? If you're not using a framework, you're almost definitely half-cobbling together you're own ad-hoc framework. Best case scenario, surely that's just as likely to atrophy the same as React/whatever.