A compiler translates a program written in one language into an equivalent program in another language; typically, the source language is a high-level language (C#) and the target language is a low-level language (CIL or Common Intermediate Language). A common technique along the way though is to have the compiler “lower” from high-level language features to low-level language features in the same language.
The C# compiler use the Lowering step quite a bit. Essentially, every new language feature we’ve got since C# 2.0 is lowered to C# 2.0 and then compiled to CIL. You’ll be surprised at what all the C# compiler lowers and to what it lowers it to.
In this talk we’ll take a look at all the hard work the compiler does for us as well as how the C# team brings us new features without the need to change the runtime. This talk will also expose you to having a better understand of the performance and/or memory implications of the code you write. A real eye opener!