john spurlock 2005

vs 2005 beta 2 - first impressions

Finally got around to installing my beta2 copy of VS 2005. Didn't do anything serious with it yet, but here are my very first impressions after an hour or so of tinkering.

The Good:

1. Generics! Big mistake not to include these in version 1 - half of the framework (and most v1 user-code out there) is instantly rendered obsolete or unnecessary. System.Collections.Generic houses the new improved collections - no more ArrayList!

1a. Generics-inspired delegates! These took me completely by surprise, found Action, Predicate, and Converter front and center in the System namespace. Not only useful as common design primitives, but they are also utilized in most of the new collection classes exactly where you would want them. (e.g. List includes .ForEach and .FindAll). Hard to imagine design like this coming from Redmond. (Personally, I would have expected a simple T Transform(T) somewhere but such is life).

1b. Nullable types! (INullableValue) Will definately be useful for dealing with the impendance mismatch of database types and value types. Also, any custom value type can make use of the same notation ( MyStruct? someValue = null; ) Death to int.Minvalue and the like...

2. Anonymous Methods! Awkward delegate syntax, but still my favorite new feature by far. True lexical closures with full access to the local method context (including local variable assignment!) Have to say I'm a bit disappointed that they didn't use a similar compiler trick to implement full-fledged anonymous classes (I mean Java's had them since 1.1 - like 1995)

3. Refactoring! Basic IDE support for common operations, and subtle things like renaming a form-containing source file now actually renames the contained form/resource files.

4. MSBuild! Each project build file is xml-ified by default. (although the solution files still use the old style?)

5. Class diagramming! Keeps relatively in sync with the source code, makes it easy to switch back and forth.

The Bad:

1. STILL no parameterized properties in C# (other than the default indexers).

2. No Eclipse/IDEA-like "quick fixes" for common compile errors (when not implementing an interface etc). How hard could this have been?

3. Clumsy but integrated unit test generation/management. Although if this is included in all flavors of the IDE (might have heard that it was only in the "team-suite"?) it will eat signifantly into NUnit's userbase.

4. No background compilation - C# development is still stuck in the write/compile/fix cycle. Ctrl-Shift-B is far too necessary to prod the IDE in the right direction.

Oh and Mono eats this stuff up too (output from the 2.0 compiler), which is kind of nice...