5 ms·
> The orphan rule. I get it, but it's still annoying. We can do better than newtype wrappers By that do you mean that there are better alternatives that Rust c
by SkiFire13 1y ago
> The orphan rule. I get it, but it's still annoying. We can do better than newtype wrappers
By that do you mean that there are better alternatives that Rust could adopt or that we need such alternatives (but they could not exist)?
- estebank 1y agoOne option would be to ignore the orphan rule withing workspaces.
- kibwen 1y agoOr let them be ignored within the root crate when building a binary, since the main concern with orphans is that libraries deep in your dependency tree become accidentally incompatible, which isn't a problem if orphans arise in the root of a binary crate, since by definition you control its source.
- SkiFire13 1y agoI know it sounds simple, but AFAIK it's not actually so easy to implement, see e.g. https://internals.rust-lang.org/t/allow-disabling-orphan-rules-for-applications/22172/4 https://internals.rust-lang.org/t/allow-disabling-orphan-rul...