C# 8: The story so far. Q&A with Jon Skeet

16/10/2018

Several of us at G-Research have made it a weekly habit to watch conference videos as part of brown bag lunches. It’s a great way for us to focus on the most interesting past talks, but comes at the expense of being able to interact with the speakers to deepen our understanding.

We therefore jumped at the recent opportunity to attend a live session with Jon Skeet, one of best speakers on the topic of C#, as part of our series of company-wide talks. His focus was on “C# 8: The story so far”. Our infrastructure is ever-evolving, but one of our cornerstones has always been the .NET platform with its main languages C# and F#. As anyone who has seen Jon Skeet can attest, he combines broad and deep knowledge of C# with an impressive ability to explain subjects in a way that is accessible without undue simplifications.

Jon chronicled the evolution of the officially released C# language versions in his excellent book “C# in Depth“, but information on the upcoming C# 8 is still largely confined to specialist circles.

An unplanned technical issue caused Jon to go ahead without any slides, turning the presentation into a much more interactive Q&A session. We largely focused on technical questions around C# 8, with brief discussions of the recently concluded “Daisy Shipton” experiment as well as the overall process of developing the C# 8 spec. Jon highlighted that Microsoft’s model has been very successful in keeping C# open to improvements while also retaining a consistent structure, by combining design proposals from experts with community input and refinement.

Some parts of the language’s evolution are owed to advances first trialled in F#, which were later applied to C# in more streamlined and accessible forms. One of the decisions the F# team made from the get-go was to treat their reference types as non-nullable: like in most functional languages, the presence or absence of a value is encoded by wrapping it in an Option. C# however took the same route as most other imperative languages at the time by having null values express… something that is not quite a value like the others. Jon spent significant time detailing the advantages and pitfalls of potentially making C# 8 follow in F#’s footsteps, by making reference types non-nullable in a backwards-compatible, opt-in manner.

The end result will hopefully be C# 8 code that is clearer and less error-prone, but the language team still has to invest a lot of time into getting all implications completely understood. It may well take all of 2019 to sort out the last details, but Jon suggested we might see it introduced incrementally over multiple point-releases of C# 8. No promises, of course, since all discussions are all still ongoing.

As part of his closing remarks, Jon rightfully suggested that some language design lessons learned within the last decades cannot be retrofit into C# without effectively making it something else — so similar to how Scala and Kotlin successfully emerged on the JVM, it may well be time to experiment with new languages on the .NET platform.

You can listen to the talk here:

   

 

Yaniv – Software Engineer

Interested in a career at G-Research?

Want to be part of a leading quantitative research and technology company? Bring your skills and experience to G-Research by applying for one of our many roles.