Closed
Description
If we were to plan for one language feature that requires a revision of the CLR, then we might as well do as many of them at the same time as make sense. What changes would we consider for C# 7 and VB 15 that would benefit from CLR support? See #166 for related discussion. This is a pared-down list for us to select from.
- Virtual extension methods (see Java-like virtual extension methods/default interface implementations, aka traits or (ruby-like) mixins #73, Proposal: Virtual extension methods #258)
- Generic constraints about static methods or constructors (see also (Proposal) Concepts/Traits (enhanced generic constraints) #129, #154).
- Array slicing (see Proposal: Slicing #120)
- Language support for tuples (see Proposal: Language support for Tuples #347) and function types (no issue yet) might benefit from CLR unification across assemblies.
- Traits (see [Proposal] Add support for traits and/or mixins #60) aka structural interfaces (see #154) or mixins (no issue yet)
Those that we would likely not do in this timeframe include
- Make void a first-class type with one value; see Suggestion: void as a first-class citizen #234 (Suggested by @ashmind) (Given how long the CLR has been around, it is probably too late for APIs to benefit, as those that would benefit most have already been written)
- Covariance and contravariance for classes (see Allow type parameters to be declared co/contra variant on classes. #171)
- Allow |, &, and ~ operators on a type parameter with the enum constraint (see Proposal: support an enum constraint on generic type parameters #262)
- Intersection types (Proposal: Implicit Interfaces #2146, though likely not that syntax) and/or union types.
- Support generic indexers (see [Proposal] Generic indexers #523)
- Higher-kinded polymorphism (see Higher Kinded Polymorphism / Generics on Generics #2212)