Bookmark and Share

Visual Studio 2010 Beta 1 Available Today

by KodefuGuru 18. May 2009 09:29

Mike Ormond has announced that Visual Studio Beta 1 (including .NET Fx 4.0)  will be available to MSDN subscribers later today.

He also posted a few screenshots. I admit that I'm somewhat saddened by the removal of the triangles.

Bookmark and Share

Parity Between Languages

by KodefuGuru 10. January 2009 17:57

The next versions of C# and VB will have improved parity between them. From the consultant perspective, this is important because one can't always choose which language to use. Although a seasoned C# developer can program in VB as well, it seems that gotchas appear and you have to refer to the documentation to figure out how do something that you wouldn't even need to think about in your primary language.

The goal of the Visual Studio Managed Languages team is to maintain the character of each language while introducing the same new features to both. In keeping with this spirit, they've introduced features from one language to the other while maintaining the target language's style and feel.

New C# Parity with VB

Late Binding - Although the new dynamic type isn't the same as late binding in VB.NET, it is similar in many respects.

Named and Optional Parameters - No longer will you need to chain tons of overloads. VB developers have mocked us C# developers a while about this. It also cuts down on the number of parameters you have to pass to COM method calls.

New VB Parity with C#

Auto-implemented properties - These are idential to C#'s auto-implemented properties in that the compiler will create a backing private member for you. However, VB does not get read-only or write-only auto-implemented properties.

Collection Initiliazers - No more have to call List.Add(...) over and over.

Array Literals - The compiler will now figure out what kind of array it is based on the types used to initialize it. 

Multiline Lambdas - The compiler accomplishes this by figuring out the widest type returned from the multiline function.

Implicit Line Continuation - C# has implicit line continuation for everything, since line termination is denoted by a semicolon or the ending of a block of code (curly braces). VB, in contrast, implicitly terminates lines and oftentime requires a line continuation character (underscore). The line continuation character is now eliminated for scenarioes where it makes sense that the line should continue. The rules for this are as follows: after an attribute, after a comma, after a dot, after a binary operator, after a LINQ query clause, after a parenthesis, after a curly brace, and after a <%= or %>.

New features added to both

Generic Variance - Remember the question about assigning a list of strings to a list of objects? Well, you still can't do that due to type safety. However, sometimes the generic only goes out. Conversely, sometimes it only goes in. You will soon be able to declare your generics that way, and it will allow things like an IEnumerable<string> to be assigned to IEnumerable<object>.

Compiling without Interop Assemblies - It used to be that a primary interop assembly (PIA) had to be distributed as another artifact with your application. This is terrible when you're using a small subset of the functionality: it could dramatically increase the size of your distributable. Worse still, it is possible to run into a dll hell situation with different versions of the pia. In .NET 4.0, you can have it compile the piece of the primary interop assembly used by your application into the executable, greatly reducing distributable size and versioning issues.

 

Most of these features are demonstrable in the Visual Studio 2010 CTP; with the exception of in and out generics. These features appear to be very useful and stable. Although CTPs are subject to change, I suspect these features will make it to the final release.

KodefuGuru.GetInfo()

Chris Eargle
LinkedIn Twitter Technorati Facebook

Chris Eargle
C# MVP, INETA Community Champion


MVP - Visual C#

 

INETA Community Champions
Friend of RedGate
Telerik .NET Ninja
Community blogs & blog posts

I am a #52er

I have joined Anti-IF Campaign


World Map

Tag cloud

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2010