Top pick from PDC05

I have returned from this year’s PDC, which was hosted in LA, and I’m more or less over the jet lag. For those of you into this sort of thing, I thought I’d share with you my top session at the conference. That session was "C#: Future Directions in Language Innovation". This session discusses some of the improvments in C# version 3 around writing relational queries directly in C#. This could be against XML data, or relational database data.
However, the really interesting stuff for me is not the fact that you can write the queries; it’s the advances in the language that allow for this querying to take place. I can’t find a transcript of the actual session right now, but Scott Wiltamouth‘s blog pointed out this video on Channel 9 (37 mins) that discusses the same issues. Also look at the C# 3.0 Specification.
So, those advances in the language; what are they?
1) Lamda functions – shorthand ways of defining predicates inline, utilising C# 2’s anonymous methods.
2) Extender methods – ways of syntactically adding methods to classes without owning the class code or deriving from it.
3) Type inference – use of the ‘var’ keyword where the explicit type of a variable isn’t given, it’s infered from the right hand side of the initialisation statement.
4) Anonymous types – mechanism for defining a type implicitly by etablishing its contents in line. e.g. "var p1 = new { Name = "Lawnmower", Price = 495.00 };"
Watch the video and do some Googling. There’s plenty of material about this out there. There are some critiques too (Dlinq issues, Lambda issues), the reading of which can often be more informative than the introduction to the technology itself.
A final note. This technology is C# version 3. C# version 2 isn’t even released yet. If you want to have some input into C#3 then now’s the time; don’t moan about it later!
This entry was posted in Computers and Internet. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s