Only a few hours left (part 4)

So we left off on the previous post with the question of why we were using Java to work with our new token visitors.  Can’t visitors be used in C# as well?  Well, yes.  However, not necessarily as conveniently as with Java.  How so?  Well, let’s take a look at what the code would look…

3

Only a few hours left (part 3)

The previous post on this topic gave us a problem statement for us to look at.  Specifically, how to design an internal structure that we want to be easily consumable from many different locations, while not weighing down the structure with any orthogonal unnecessary functionality.  At the end of the previous post we also discussed…

3

Only a few hours left (part 2)

One of the things we love doing around here is dicussing different design techniques for attacking problems in general and the work we do in specific.  One of the very common conversations we have is simply how to structure internal data within the C# compiler and language service to best facilitate things like maintainability, readability,…

8

Only a few hours left (part 1)

The PDC keynote is going to be in a few hours.  And while i won’t be there, i’m definitely going to be watching it live (to access it go here).  There’s a lot i’m going to want to blog about at that point, but to help out my later posts i’m goign to start by presenting…


You did it!

As many of you may know, we recently announced a pretty big change to the C# 2.0 language.  The full details of the change can be found at Soma’s blog but i’ll include the information here. We designed the Nullable type to be the platform solution, a single type that all applications can rely on to…

30

Heads, or Tails?

Here’s a nifty little problem that a friend gave me yesterday that i thought i’d share with you: You have three items (call them ‘a’, ‘b’ and ‘c’) that you want to choose any one from without bias.  If you had a fair three sided die, you could assign an item to each side of…

149

Pop Quiz!

Ok class.  Get out your pencils for another pop quiz.  Without using anything beyond your mind, answer the following question: Consider the following code: public class A<T1>{ public T1 a; public class B<T2> : A<T2> { public T1 b; public class C<T3> : B<T3> { public T1 c; } }} class PopQuiz{ static void Main()…

31

The Consequences of Performance Optimizations

I wanted to write a post today about a very interesting bug we just came across related to Refactoring.  As i just blogged about verification, i thought that this would be a good followup.  First, a bit of background.  Referencing the previous post, we can see the following Q/A about refactoring: Why is it important?…

28

The more things change

A while back we got an MSDN feedback report about a crash a customer was experiencing.  The customer had the following code: class A : B {}class B : A {}class C : B { override //Type space here} At this point the IDE would just up and vanish.  What happened?  Well, (as you can…

15

The future of the C# language

PDC is coming up soon, and the session list has been posted. One thing i wanted to point out was the abstract for a session that the C# team will be giving on version 3.0 of the language: C#: Future Directions in Language Innovation from Anders Hejlsberg Join Anders Hejlsberg, Distinguished Engineer and chief architect…

45