C# 8.X Plans Revealed
Written by Kay Ewbank   
Thursday, 04 July 2019

We may still be waiting for the final release of C# 8.0, but the developers are already discussing what will form the basis of C# 8.X. The list reveals some details of what will miss the cut-off for C# 8.0.

The plans for C# 8.X have appeared on GitHub as a milestone, somewhat worryingly (and probably to prevent speculation on a release date) with a due date January 01, 2089.

c

Once C# 8.0 is released and out of the way, one headline inclusion in C# 8.X will be data records. This was supposed to be a C# 8.0 feature, but proved too complex to make the cut. The new plans don't even say whether it will be in C# 8.1 or a later release. Records are intended to make it simpler to create Data Transfer Object (DTO) classes, especially those that only consist of read-only properties and fields. The records syntax will create the code to create DTO classes.

Another item planned for these future releases is a Caller Expression Attribute. This will mean developers can capture the expressions passed to a method, and the idea is that it will enable better error messages in diagnostic testing APIs, and reduce keystrokes in automated testing.

Target-Typed 'new' expressions are another main improvement. The idea is that such expressions avoid the need to have type specification for constructors when the type is known. The motivation for this is to allow field initialization without duplicating the type.

The Null-Enhanced Common Type is another change that the milestone suggests will be added to 8.X.The thinking is that in some circumstances, the current common-type algorithm results are counter-intuitive, so programmers have to add what feels like a redundant cast to the code.

The planned change would provide a way of avoiding the need to have explicit casts if your value types and ternary operators are nullable.

For example, an expression such as condition ? 1 : null would result in a value of type int?, and an expression such as condition ? x : 1.0 where x is of type int? would result in a value of type double?.

The full list of proposed improvements can be seen on the milestone plan on GitHub.

c

More Information

C# 8.X Plans On GitHub

Related Articles

C# 8, What's Coming

C# Future Revealed At Build

Project Rider A Cross Platform C# IDE

C# Joins PVS-Studio Line Up

C# 7 Features

C# 7 - What Would You Put In?

Visual Studio 2015 CTP 5 Released       

Microsoft Mass Migration To GitHub       

.NET Core The Details - Is It Enough?       

Latest On C# 6 And VB 12

C# 6.0 Features       

C# Guru - An Interview With Eric Lippert

Play by Play: C# Q&A with Scott Allen and Jon Skeet

C# Gets A New Operator - Safe Navigation

RyuJIT - The Next Gen JIT .NET Compiler

Microsoft tells C# developers to learn JavaScript!?       

Microsoft Team Explains Language Stagnation       

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


OpenSilver Adds XAML Designer For Visual Studio Code
12/12/2024

OpenSilver 3.1 has been released. This version adds a drag-and-drop XAML designer for Visual Studio Code (VS Code), a new modern UI theme, and expanded support for WPF features. The open-source altern [ ... ]



Visual Studio 17.12 Released Along With Aspire
25/11/2024

Visual Studio 2022 v17.12 is now available. The release can be used for .NET 9 projects and has a range of other improvements.


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info