Designers are off and running with plans for the next generation of Microsoft's C# language, with key themes centering on data management, performance, and reliability.
According to meeting notes for the C# team, posted earlier this month on GitHub, the team is looking beyond the planned version 6.0 of the type-safe, object-oriented language. As posted by Microsoft's Mads Torgerson, a design team member, the notes say: "This is the first design meeting for the version of C# coming after C# 6. We shall colloquially refer to it as C# 7." Likely themes to investigate for C# 7 include working with data; performance, reliability, and interop; componentization, distribution, and meta programming.
In accordance with theme of working with data, possible C# features could include pattern matching, "denotable" anonymous types, working with common data structures, slicing, and immutability. The notes state that today's programs are connected and trade in rich, structured data — what's on the wire, what applications and services produce, manipulate, and consume. Traditional object-oriented languages, while good for many tasks, deal poorly with this setup.
C# builders must look at functional languages to deal with this, the notes stress. "Functional programming languages are often better set up for this: data is immutable (representing information, not state), and is manipulated from the outside, using a freely growable and context-dependent set of functions, rather than a fixed set of built-in virtual methods," the notes say. C# followers need to keep being inspired by languages including F#, Scala, and Swift.
For performance, reliability, and interop, the team states that C# has had a history of being "fast and loose" in performance and reliability. "Internally at Microsoft there have been research projects to investigate options here. Some of the outcomes are now ripe to feed into the design of C# itself, while others can affect the .Net Framework, result in useful Roslyn analyzers, etc," Torgerson's notes say. "Over the coming months we will take several of these problems and ideas and see if we can find great ways of putting them in the hands of C# developers."
Concentrating on componentization, the notes state the "once set-in-stone issue of how .Net programs are factored and combined is now under rapid evolution." Most work in this space is more tooling-oriented, covering capabilities including the generation of reference assemblies, static linking, determinism, NuGet support and versioning. "This is a theme that shouldn't be driven primarily from the languages, but we should be open to support at the language level."
To help with the distributed nature of modern computing, C# designers are pondering async sequences and serialization. "We introduced single-value asynchrony in C# 5 but do not yet have a satisfactory approach to asynchronous sequences or streams." For serialization, "we may no longer be into directly providing built-in serialization but we need to make sure we make it reasonable to custom-serialize data — even when it's immutable, and without requiring costly reflection."
Sign up for CIO Asia eNewsletters.