Open stephentoub opened 2 years ago
Tagging subscribers to this area: @dotnet/area-system-numerics See info in area-owners.md if you want to be subscribed.
Author: | stephentoub |
---|---|
Assignees: | tannergooding |
Labels: | `area-System.Numerics` |
Milestone: | 7.0.0 |
I don't see any use case against co/contravariance on generic math. Generally we are using generic math against structs. And even if we support it, currently we have no way to call a static interface member on interface type directly without a type parameter.
@tannergooding (and @dotnet/area-system-numerics), have you reached a conclusion on this? If we decide to add the expressions, we would need to do so before the RC2 snap.
@tannergooding and I discussed this on Friday and have decided we are not going to include this feature. He plans on sending a longer explanation here but for now we can remove the blocking-release tag.
I want to keep this in the 7.0.0 milestone, but labeled as documentation. We need to have notes about variance in the docs and/or here so that folks who ask about this again can understand why we chose not to express it.
@jeffhandley should this still be kept in the 7.0.0 milestone?
Oops; nope. Thanks; updated.
See discussion in https://github.com/dotnet/runtime/pull/74025#issuecomment-1217129862. The question is whether the new generic math interfaces being introduced in .NET 7 should express co/contravariance (in and out on the various generic type parameters), e.g. https://github.com/dotnet/runtime/commit/197d96f92887c0032c5d19dff47d377cf63672f4. It's not clear if there are meaningful scenarios for it or if adding them now could conflict with future language work, but it could also be a breaking change to add them later.
Seems likely we should just leave them as-is, but we should make an explicit decision.