Thursday, November 16, 2006

C#'ing into the future

It's been a week since I was at the Microsoft event, where Anders Hejlsberg addressed the new features in C# 3.0, and better tell you about what he told me about..

I had seen a webast where he talks about C# 3.0 before, and he started the exact same way, by stating that:

Data != Objects

The rest was kinda like that webast, but he seemed to go more into details, which was brilliant. As mentioned I had seen a lot of his stuff before, but there where a few points that, if not supprised me, then made me think. Fx. in my head C# 3.0 == LINQ and nothing more. Anders made it quite clear that that wasn't the case. C# 3.0 is a whole bunch of small things that combined make the developer able to write C# in a query-like syntax. The small features are mainly:
- Extension methods
- Lambda expressions
- Expression Trees

As Anders said, the

var q = from c in Customers
where c.City == "London"
select c.Name

is only "syntactic sugar" translated by the compiler to:

var q = Customers.Where( c => c.City == "London" ).Select( c => c.Name );

ie. method calls! All very simple when it's explained to you like that..


The most important thing, however, was that before we left the lecture Marcus, the technical manager in Composite, got Anders' autograf in the C# 2.0 book :-)




In other news: My G1 school project is finished!! Now I only need the printing part, which I will do tomorrow, so I'm what you could call a free man tonight!! Hmm.. Where did I put that shortcut for Visual Studio ;-)


'Till next time...




Oh yeah, and check this out: http://www.zefrank.com/theshow/gallery/d/8544-1/yeeha.mp3

No comments: