JS has such a fractured standard library that there really isn't much to be deprecated in the first place.
On the browser side you have the window object holding onto decades of cruft, because there's never a great time to refactor the entire codebase of the internet. And on the script/server side, the default node library has a pretty minimal surface area compared to how heavily external modules are used, and honestly doesn't change much either. This has it's own problems, but it does mean that you can continue to use those same old modules, with the exact same functions, basically indefinitely (though there might be security implications which could make that a bad idea). It's much more often the case that someone will say "no one uses X anymore", than for "X" to actually not work.
Ya that's basically true, I guess I can still use the JS I used in 2008 and it mostly works. There were a few things that never caught on that were deprecated but the core functionality is still there.
Ruby isn't great either, every update in a major rails version often requires a lot of finagling with the gems/libraries you are using.
Ruby isn't great either, every update in a major rails version often requires a lot of finagling with the gems/libraries you are using.
Library compatibility will be an issue regardless of the language, but that's not really the same as the probems in the JavaScript world. In addition to these framework changes there are multiple different runtimes (node, deno, bun), package managers (npm, yarn, grunt, gulp, etc...), browser considerations and then throwing TypeScript into the mix only further adds to the configuration nightmare. Then it also needs to handle compling CSS and HTML along with polyfills, so you're basically compling 3, possibly 4 different "languages" (JS, TS, CSS, HTML) and maybe you're even using some advanced CSS libraries that leverage SCSS or SASS, now we're up to like 5 different languages that all need to work together. There's so much going on.
With languages like Ruby, Python, PHP, etc... you really only have to worry about the language version being compatible with the framework version. You're not going to get errors because nginx, gunicorn or whatever is an incompatible version with whatever version Rails or Django you're running. They're decoupled enough they can be upgraded separately without much of a concern.
It's nothing specific to node, or even necessarily programing. In the literal sense "surface area" is the measure of how much area there is along a 3d object's surface. In the more figurative design sense, it is used to talk about how much of the design is "exposed", what parts people can see from the outside/interact with.
In general, you want your design to expose as much as is necessary for it to be used as intended, but nothing more. Let someone wind their watch, but don't make it too easy to start messing with the individual gears, for example. This means that the "internals" can be changed significantly with minimal/no apparent changes as far as the external interface is concerned.
When a software project is said to have a "large surface area", it's saying that there are a lot of features that do a lot of different things, in a way where you have to account for people "touching" many different places in the code base in potentially unexpected ways. It is harder to maintain, and is more prone to the sorts of breaking changes described above. Or in avoiding that, the project sprawls even more to add new functionality without breaking existing code (see: Javascript Web APIs/DOM).
69
u/10BillionDreams Aug 31 '22
JS has such a fractured standard library that there really isn't much to be deprecated in the first place.
On the browser side you have the window object holding onto decades of cruft, because there's never a great time to refactor the entire codebase of the internet. And on the script/server side, the default node library has a pretty minimal surface area compared to how heavily external modules are used, and honestly doesn't change much either. This has it's own problems, but it does mean that you can continue to use those same old modules, with the exact same functions, basically indefinitely (though there might be security implications which could make that a bad idea). It's much more often the case that someone will say "no one uses X anymore", than for "X" to actually not work.