Compiler as a Service

As I’m writing this chapter, the managed language teams at Microsoft are working full speed to turn the C# and Visual Basic compilers into managed code for a subsequent release of the framework. This work—referred to as the Roslyn project—will open the road to lots of scenarios in the field of meta-programming.

Today, Microsoft’s C# and Visual Basic language compilers are black boxes: Source code goes in, and assemblies come out, but what goes on in the middle is shielded away from the users. With C# 3.0, the need to expose parts of the code representation—expression trees more specifically—became apparent as a cornerstone to allow the creation of LINQ providers. In such a setting, LINQ providers play the role of runtime ...

Get C# 5.0 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.