Hacker News new | ask | show | jobs
by tthisk 2559 days ago
It is interesting to see the package management approach Deno (Ryan Dahl’s new project) is taking. It has stated as an explicit goal to make the package manager part of the same deno runtime. It tries to achieve this by supporting a native webstandard for modules out of the box. The approach seems to be partially inspired by the go 1.14 module system.
1 comments

I like this approach too. npm at least, and perhaps other package managers, are replicating DNS a bit too much for my taste, by providing their own (centralized) namespace. Why not use the existing namespace that is DNS (which is decentralized). It's pretty nice to be able to host my packages on my own servers with my own domain name.
Usually the motivation is that the federated package names are much longer than the centralized short package names.
Eliminating short names as a value hopefully will encourage more semantic names instead of cute words that are entirely non-descriptive.
Much longer is, I guess, a matter of taste. For example the package name "go.uber.org/zap" [0] looks quite short to me.

[0]: https://godoc.org/go.uber.org/zap

Not to mention that short names get depleted eventually and one needs to use longer names then anyway (see npm namespaces).

Or even end up with low quality generic defaults for things like routing in react because someone got the default name of say the routing library.
Presumably, if you really want short names, a local hosts like config with aliased names would do the job just fine. This has the added benefit that everyone can have their own aliases.
No, I think the attraction to centralization is not only that it can provide short names, but that it can provide short names that everyone agrees on the meaning of.