Hacker News new | past | comments | ask | show | jobs | submit login

Wouldn't this be solved easily with symbol versioning?



Possibly (I've never seen a concrete proposal of per-symbol versioning, so I can't say for certain), but in that case all downstream consumers of your library would have to pre-emptively declare the version for each and every symbol they use.

Now obviously not all users will be using every symbol from every library that they depend on, but, to use the OP's example of libc, which contains over 4,500 symbols... that starts to look unwieldy.

Of course, you could technically do this today by just having every symbol in its own crate. And while that seems like quite a stretch, I think it is the consensus that the libc crate in particular is too big, and should have been split out into multiple crates in order to better facilitate these sorts of upgrades. So there might be a practical middle ground by having one crate for "crucial, fundamental symbols" and a separate crate for "ancillary symbols", where each could be versioned separately. That might get close enough to the precision of per-symbol versioning without getting unwieldy.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: