Hacker News new | ask | show | jobs
by tolmasky 3472 days ago
Yes this proposal is for "functional" languages (where libraries provide functions, and records). JavaScript is a good fit here. When you need "identical" objects across different dependencies, the idea is to specify it as such (npm has a notion of a "peerDependency" <-- this is not a black box object but the requirement that this "exist"). Plugins are a good example of this. If you are building a React plugin, you don't want to require your own React (and then hope the build system dedupes it!), instead you state "I can build when React at this version is present". Once you have this explicit requirement, it is much easier to reason about the (few) "shared" objects. Here most users would raise an eyebrow that for some reason the "resolved" React is a very low version for example.