Skip to content

What language proposals would benefit from CLR changes? #420

Closed
@gafter

Description

@gafter

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.

  1. Virtual extension methods (see Java-like virtual extension methods/default interface implementations, aka traits or (ruby-like) mixins #73, Proposal: Virtual extension methods #258)
  2. Generic constraints about static methods or constructors (see also (Proposal) Concepts/Traits (enhanced generic constraints) #129, #154).
  3. Array slicing (see Proposal: Slicing #120)
  4. Language support for tuples (see Proposal: Language support for Tuples #347) and function types (no issue yet) might benefit from CLR unification across assemblies.
  5. 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

  1. 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)
  2. Covariance and contravariance for classes (see Allow type parameters to be declared co/contra variant on classes. #171)
  3. Allow |, &, and ~ operators on a type parameter with the enum constraint (see Proposal: support an enum constraint on generic type parameters #262)
  4. Intersection types (Proposal: Implicit Interfaces #2146, though likely not that syntax) and/or union types.
  5. Support generic indexers (see [Proposal] Generic indexers #523)
  6. Higher-kinded polymorphism (see Higher Kinded Polymorphism / Generics on Generics #2212)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions