3 ms·
> Is it just because NPM does and javascript is bad Not at all! In fact, npm's implementation is why some are pro, but also why some say that it's not worth it
by steveklabnik 6y ago
> Is it just because NPM does and javascript is bad
Not at all! In fact, npm's implementation is why some are pro, but also why some say that it's not worth it; see https://news.ycombinator.com/item?id=24444852 https://news.ycombinator.com/item?id=24444852 for some npm specific sentiment.
(Incidentally, npm added scoped packages in 2015, after these decisions were made for crates.io. However, crates.io is still smaller than npm was then...)
There isn't really a TL;DR because this space is complex, and there's a lot of details, and they matter, and different people have different reasons for not wanting them. I think it's good that github has namespaces, but that doesn't mean I think that Cargo should have them, because they're fundamentally different services.
The short reason we gave back in 2014 was:
> Because namespaces are strictly more complicated in a number of ways,and because they can be added compatibly in the future should they become necessary, we’re going to stick with a single shared namespace.
from https://internals.rust-lang.org/t/crates-io-package-policies/1041 https://internals.rust-lang.org/t/crates-io-package-policies... which is linked in the post.
- mmis1000 6y agoBut unlike traditional namespace, that you automatically got alias to things inside the same namespace. The npm's namespace is basically just a preserved prefix, mention scoped package inside another scoped package still requires you to write full name (scope + package) or it didn't work. I don't really see a reason that you can't implement it in a flat name package manager? Something like "you can't publish a package named as 'USERNAME_private_WHATEVER' unless you are USERNAME"
- steveklabnik 6y agoNobody is saying that it's impossible to implement. However, someone would have to write that up as a plan, including all the details, and put it through the RFC process, and get folks to agree that that plan is the one that should be implemented, rather than other possible plans.
- deleted 6y ago[deleted]