Why IL?

One of the earliest and most frequently-asked questions we got when we announced the Roslyn project was “is this like LLVM for .NET?” No, Roslyn is not anything like LLVM for .NET. LLVM stands for Low-Level Virtual Machine; as I understand it (admittedly never having used it), compiler “front ends” take in code written in…


A C# Reading List

Just a couple of quick links today. First: One of the questions I get most frequently is “can you recommend some good books about learning to program better in C#?” The question is usually asked by a developer; the other day I was surprised to get that question from one of the editors of InformIT….


Breaking changes and named arguments

Before I get into the subject of today’s post, thanks so much to all of you who have given us great feedback on the Roslyn CTP. Please keep it coming. I’m definitely going to do some articles on Roslyn in the future; the past few weeks I have been too busy actually implementing it to…


The Roslyn Preview Is Now Available

I am super excited to announce that the Roslyn project code is now sufficiently coherent that we can start showing it to customers! But I am getting ahead of myself somewhat. What is this “Roslyn” project? Here’s the deal. We’ve got these great premiere languages for .NET development, C# and Visual Basic. Obviously the compilers…


Insanely great

I’ve never owned an Apple product; I haven’t written Mac software professionally since working on the Mac version of Visual Basic briefly in 1994. Nevertheless, Steve Jobs inspired me every day. Wanting to make “insanely great” technology is one thing. Having someone prove, over and over again, that the insanely great is actually within our…


Async articles

I am pleased to announce that MSDN Magazine is doing a special issue this month on the new “async-await” feature that we are working on for the next versions of C# and Visual Basic. If this subject interests you, see my introductory article for beginners, Mads Torgersen’s article on how it works behind the scenes…


Keep it secret, keep it safe

A lot of people really love the idea of cryptography. To computer geeks like us there is nothing cooler than the idea that computing relatively simple arithmetic on a message can enable you to communicate secretly with anyone in the world, even if there are eavesdroppers. Unfortunately, this means that there are a lot of…


Inheritance and Representation

(Note: Not to be confused with Representation and Identity) Here’s a question I got this morning: class Alpha<X>   where X : class {}class Bravo<T, U>   where T : class   where U : T {  Alpha<U> alpha;} This gives a compilation error stating that U cannot be used as a type argument for…


What is this thing you call a "type"? Part Two

Well that was entirely predictable; as I said last time, if you ask ten developers for a definition of “type”, you get ten different answers. The comments to the previous article make for fascinating reading! Here’s my attempt at describing what “type” means to me as a compiler writer. I want to start by considering…


What is this thing you call a "type"? Part one

(Eric is out camping; this posting is prerecorded. I’ll be back in the office after Labour Day.) The word “type” appears almost five thousand times in the C# 4 specification, and there is an entire chapter, chapter 4, dedicated to nothing but describing types. We start the specification by noting that C# is “type safe”…