4 ms·
What you're advocating is essentially the way Javascript originally worked, with the web itself serving as the "package manager." but one day someone decided J
by krapp 3y ago
What you're advocating is essentially the way Javascript originally worked, with the web itself serving as the "package manager." but one day someone decided Javascript needed to be a serious business language for serious business, and serious business languages use compilers and toolchains and have a package manager. And so here we are.
- skybrian 3y agoAdding a runtime dependency on some random webserver seems bad? It could be fixed by using reliable CDN's though.
- krapp 3y agoYou don't have a runtime dependency if you just download the js to your server and write some script tags. You do have to do things manually and locally but you'd be surprised how robust that can be. Just vendoring scripts and not automating builds would solve like 99% of modern JS problems. The benefit of CDNs used to be that you could cache a library for use on multiple domains but I don't think that works anymore.
- skybrian 3y agoIt reminds me of header-only C++ libraries, or downloading jar files manually back before Java had package managers. These don't seem bad for dependency-free libraries, but they won't warn you about incompatible package dependencies.
- sgarland 3y ago"What if we used JS as a backend language?" SMACK Somewhere in an alternate universe, there's a better timeline.
- wruza 3y agoWhat’s in js that makes it different from any other language? Any other language would likely bend into <what you mean by that> form with enough users coming to it from the “web” direction. It’s just a law of big numbers.
- sgarland 3y agoCompared to other high-level languages, nothing, really. I actually really like JS for its intended purpose (or just as a way to learn programming). But I also think it’s been permanently tainted due to a constantly shifting ecosystem that can’t settle down, and a user community that is constantly chasing new shiny things.
- UncleMeat 3y agoJS is a messy language. But I don't think that this is really fair. Dependency management is a disaster in a ton of ecosystems. It is often a different set of disasters than what npm has, but it isn't like this is a solved problem everywhere else and it is just the js ecosystem that sucks. NPM is made marginally worse by the poor standard library in JS but I don't think the problem is fundamentally attached to the language in any meaningful way. And the push to use JS for backends was not "we want this to be a serious language" but was instead "well, we are already using JS for frontends so it'd be nice from a practical standpoint for hiring and training to be able to use the same language and ecosystem for backends too."