Eric Lippert Reviews C# and Speculates on its Future
O'Reilly's Rachel Rouemeliotis recently spoke with Eric Lippert, Principal Software Design Engineer on Microsoft's C# Compiler Team. The conversation covered a number of topics and provided Lippert's brief summary of the C# world. This discussion prompted InfoQ to contact Lippert to provide greater context for his comments leading to a thoughtful analysis of the language's design philosophy.
Lippert began his O'Reilly interview by commenting on C#'s popularity “throughout the Windows ecosystem”, and noting its usage for development on the X-Box 360, Windows Phones, Active Server Pages, and line-of-business applications. One strength of C# is that it is highly general and not a domain specific language. Despite this generality, Lippert reminds that C# is not intended to include “everything but the kitchen sink”.
This prompted InfoQ to ask Lippert for an update on Microsoft's strategy for C# and Visual Basic to provide clarification on the goals that the company for each. When comparing C# and VB, Microsoft considers both to be general-purpose languages that are intended to coevolve. This does not mean that they will become the same language with different syntaxes. Rather, “[Microsoft] intends that major new C# features will have similar features in VB, and vice versa”.
Existing examples of features that have already been added are LINQ support, and generic covariance. An upcoming feature to be added is support for asynchronous programming using the async/await keywords. Lippert remarked in his O'Reilly conversation that the “... problem is we live in a world with latency” and programmers must write their programs to handle the delays they face when waiting for user input or network communications. To ease this burden the async/await keywords allow programmer's to annotate their code so that the compiler can assist in managing asynchronous code sections. This leads to more readable code and easier development.
In our conversation Lippert recognized the historical “philosophical differences in the design of C# and VB that go deeper than merely what features each language supports”:
VB has historically been designed with the philosophy “put as few roadblocks in the way of the user as possible; if the code is not clear, try to figure out what they meant”. C# has historically been designed with the philosophy “if the code is not clear, it might be wrong; tell the user and make them fix it before they continue”. The goal – programmer productivity – is the same, but the philosophical approaches to achieving productivity are opposites! This is a good thing; programmers have different opinions on how to most effectively solve problems, and it is good that we produce tools that encourage different work styles.
Finally, during his O'Reilly conversation Lippert commented on some paths he thought C# might take in the future-- but all of these were prefaced with the comment that these are his personal speculations and do not represent official Microsoft commentary.
However, with respect to Project Roslyn Lippert confirmed with InfoQ that upon completion of the existing compilers shipping with Visual Studio will be replaced by those developed for the Roslyn project. In addition the Roslyn analysis tools will replace the existing author-time code analysis engine. (This is the segment of code that provides real-time feedback as code is written in the VS editor window.)
Lippert wanted to clarify that as of today, “no particular feature set [is] in mind” at this time for C#/VB for language versions beyond those included with Visual Studio 2012. At this point Microsoft has “no particular feature set in mind” for the successor to C# 5, but is closely monitoring industry trends to see what language research areas may provide assistance. Lippert states that his group is still in the exploration stage as it seeks to both better define the problems they observe in industry and the possible solutions that may be possible.