Roy Osherove

View Original

VB.Net is diverging from C#. That can't be bad, or can it?

It's interesting to see how VB.NET is slowly but surely diverging itself into a whole different language and toolset. The most notable of these changes to me right now is the “ My” language addition, available in VB.Net only in the next version of VS.Net (2005).
This feature is pretty frigging' cool. It basically is an “alternate” object model, a simpler object model with shortcuts to lots of frequently used .Net functionality, which also simplifies lots of the calling conventions for many activities such as read/write files, printing, reading comm ports and so on. This is indeed a good feature, and is a welcome addition to vb.net.
But it has a not so good side. It means VB.Net programmers will be learning and using a simpler, but most importantly *different* object model for many tasks, than the one used by C# developers. That would lead to difficulties in migrating between these two languages and developing/maintenance of shared code bases with these two languages intertwined. Basically, a vb.net dev who wishes to write in C# would have to “re-learn” the same “different” object model used by C#. This effectively overturns lots of the statements going on right now that say “if you can develop in *this*, you can develop in *that*“. No. The learning curve just grew when switching sides. At least it only grew when switching from one of those sides to the other. A C# dev can still use the same programming object model they are used to in VB.Net, barring small syntax changes. A VB.Net dev who only used to work with “My” will have quite a learning curve to go through.
So how do you solve this? I'd say go ahead and add the “My” feature to C# as well. I don't see any other way around it. Well, there is another way though quite impractical - when you teach VB.Net - teach it using the C# object model, not the simplified one (assuming you want the devs you teach to be able to work in both languages in the future)
More stuff this could cause: the return of the VB coder myth (a.k.a “Mort”). Maybe it can even convince vb coders to leave C# alone afraid of the learning curve.
In conclusion, I'm not trying to diss this feature. In fact, I think it is so important, it should be in both languages, or it will make *too much*  of a difference and create an invisible, yet remarkably familiar "wall" between the two old camps.