It's the final day of TechEd Europe 2004 and even though I still have a couple of sessions to attend, I can say it's been a very interesting and fun week! Most of the sessions had some really cool content, although I personally would have liked to see a couple more advanced level sessions (or at least not have those that are held be planned in the same timeslots). This morning I went to Visual C# 2005: Language Enhancements, presented by Dan Fernandez, the Visual C# product manager. First of all I'd like to say that he's a very good speaker, the session was very quick-paced (mostly because there was so much ground to cover) but never confusing or unclear.
The most important thing and because of that discussed in the greatest detail were ofcourse generics. Because of their significance I had already read some articles about them (such as Jason Clark's two articles in MSDN magazine last year) so that contained little new information, especially since I've already been playing with them for the last couple of days with the Visual C# Express beta. Still, the part about constraining generic types was new to me, but besides that it was good to get another overview with live samples
Next was a discussion of anonymous methods which will fortunately end the relatively large amount of code needed to create simple eventhandlers, although one of the examples contained an entire inline method, about 10-15 lines of code, which would be a bad idea to actually use I think, because those things don't really make code more readable. Mostly because the idea of methods-within-methods are fairly unknown to programmers of other regular languages (C++/VB/Java), so that would make reading C# more difficult for non-C# developers.
Then there was a discussion of nullable types, iterators (of which the new yield concept made me think about co-routines), property accessors, static classes and fixed-size buffers, which all sound like great new additions, even the namespace alias qualifiers.
One thing didn't make me happy though, which is partial types. I really don't see the advantages in having them. For instance, you might say, it moves the generated Windows Forms and Web Forms clutter into another file so you don't have to deal with them in your main sourcefiles. Well, there's actually this cool #region feature the IDE supports that lets you collapse them. In fact, all the generated code (also for stuff like interface implementations) is always put into collapsed regions by default. However, I do often use some other editor when looking at other people's code or to quickly try to understand something in a class by opening it in some text-editor and searching for a methodname. No longer can you rely on finding it because it might reside in some other file which contains another part of the class you're looking through. How to figure out where all parts of a class actually are? By forcing some naming convention on files? That would be a step back (towards Java) so that doesn't sound like a good idea.
What I disliked the most is that the session demonstrated that the VC# IDE is totally capable of dealing with multiple files that contain a single class like they're all together in a single file, which means Microsoft has invested quite some time into developing this, even though it adds absolutely nothing on a functional level. But hey, if everybody wants it, I suppose I understand it would get implemented eventually. Personally, I think I'll stuff all the generated partial types into std_afx.cs, along with the new no-warning-policy-evasion mechanism with #pragma.