-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Specialization] Alternatve Minimal implementation: only allow whole-impl specialization, haskell style #125295
Comments
Rust does not have Haskell's type system, it has a much more complicated one (unless you mean "Haskell with approximately 100 compiler features enabled", in which case it has a much simpler one), so, while I'm not sure if this is the best venue for such a proposal, in whatever venue you do take it to, you're going to want to actually explain what you mean. |
in my proposal there would be two types of |
AFAIK the main soundness problem is with specialized implementation applying depending on some lifetimes. How are you proposing to solve that? |
could you give an example of code that would be potentially unsound under this proposal? |
See #40582 for an example. This old blogpost has a nice explanation of what's the fundamental problem with specialization, along with a bunch of other tricky examples. |
This isn't really actionable so I'm gonna close it. |
Many of the difficulties #31844 has encountered come from dealing with things that happen when some but not all of a trait's items are overridden. I would argue that this is overkill for the common usecase of making blanket impls not conflict with more specific impls. this would also address the most common reason for people asking for negative type constraints.
The text was updated successfully, but these errors were encountered: