C# 6.0 is on track for release along with the upcoming Visual Studio 2015, but developers won’t see C# 7 for quite a while. That doesn’t mean Microsoft isn’t already planning it out, though.
C# and Roslyn compiler program manager Mads Torgersen has posted a working list of C# 7 features on GitHub detailing the proposed features receiving strong or moderate interest, the features developers likely won’t see, and the features Microsoft isn’t quite sure what to do with at the moment.
Torgersen stressed that the list is in no way official, and that the final shape of C# 7 and future versions of the programming language are still very much up for debate. The working list of features includes:
Features with strong interest:
- Tuples
- Pattern matching
- Records/algebraic data types
- Nullability tracking
- Asynchronous streams and disposal
Features with some interest:
- Covariant return types
- More support for expression trees
- Syntax for lists
- Syntax for dictionaries
- Serialization and data binding support for records
- Deterministic disposal
- Immutable types
- Type providers
- Existing or other ways of adding possible cross-assembly attributes
- Scripting features back into mainline language
- Ref locals and ref returns
- Read-only parameters and locals
- Attributes on lambdas
- Method contracts
- Extension members
- Compile-time attributes
- Attributes in more places
- Supersedes
Features with small levels of interest but deemed useful by C# team:
- Allow extension methods in non-static classes
- More “Betterness,” the C# method calling rule, with generic constraints and static vs. instance methods
- Params IEnumerable
- Binary literals
- Digit separators
Interesting features requiring open-source CLR support:
- Additional generic constraints (some may not need CLR)
- Interfaces that can only be implemented internally
- Default implementations in interfaces
- Array slicing syntax
- Static interface members
Features probably not in C# 7:
- “Metaprogramming”
- Hooks on object initializers
- Safe fixed-size buffers
- Lambda capture lists
Features we’ll likely never see:
- INPC support
- ISupportInitialize support
- Destructible types
Unbucketed or “wild card” features:
- Yield, or non-quadratic foreach
- Local functions
- Declaration
- Expressing unreachable code
Microsoft will announce further information on C#, Visual Studio 2015 and various other developer tools at next week’s Build conference.