Dynamic in C# IV: The Phantom Method

Yes, this does sound like a Star Wars movie, but no, I’m not a Star Wars geek that just likes to pull lines from my favorite movies (though I rather enjoyed Star Wars). This post will deal with what we’ve coined "the phantom method". It’s the method that the static compiler will bind to during…

6

Dynamic in C# III: A slight twist

Last time we dealt with the basics of dynamic binding. This time, we’ll add a small twist. First, lets recall the example we were using last time: static void Main(string[] args) { dynamic d = 10; C c = new C(); // (1) Dynamic receivers. d.Foo(); // Call. d.PropOrField = 10; // Property. d[10] =…

3

Channel 9!

A few weeks ago, a few of us on the compiler team did a Channel9 interview, discussing some of the new features that we’re working on and how they fit into the whole Visual Studio 2010 story. The video is now online! In it, we talk in quite length about the dynamic feature, so if…

1

Dynamic in C# II: Basics

Last time, we began to dive into dynamic binding in C# and what happens through the pipeline. This time, we’ll take a simple scenario and pick apart the details of what happens under the covers, both during compile time and runtime. We can break down what the compiler does into three parts: type and member…

15

Dynamic in C#

The other day I was playing around with some office code, and I found myself writing a lot of code much like the following sample that Anders used at his PDC talk: static void Main(string[] args) { var xl = new Excel.Application(); ((Excel.Range)xl.Cells[1, 1]).Value2 = "Process Name"; ((Excel.Range)xl.Cells[1, 2]).Value2 = "Memory Usage"; } As you…

23

Microsoft Visual Studio 2010

The cat’s out of the bag! Hours ago at PDC ’08, I got to watch Anders unveiled the new C# 4.0 language features that we’ve been working on. This unveiling was accompanied by some fantastic demos of our work in action. Even though I’ve been working on this stuff for the past year, I was…

3

So-cal CodeCamp 08!

I got the opportunity to give a talk at the SoCal CodeCamp 08 this past weekend, and its driven me back to blogging. Its been just over 8 months since my last post – these 8 months have been spent with my head down working on Visual Studio 2010, the CTP of which is to…

0

Optional Modifiers and Overload Resolution

Optional Modifiers (or modopts) are CLR constructs that allow types to be annotated with optional information. This allows compiler writers to annotate their types with additional information that may not have a direct CLR representation. The managed C++ compiler for instance, uses modopts to represent const types. The C# compiler does not use modopts for…

3

Generic Method Substitutions and Unification – Part two

Last time we talked about generic method substitutions which resulted in types being declared with more than one method with identical constructed signatures. After thinking long and hard about this problem, we’ve come to a conclusion as to how to resolve this issue in the next release. First, lets recap what we know about the…

2

generic method substitutions and unification

It’s been a while since I’ve last written – my apologies. We’ve been hard at work figuring out what the next release of C# will look like, and I’m happy to say that I’m very excited about what we’re working on. Great minds are at work figuring out things like integration of C# with the…

6