Tuesday, August 28, 2007

VB.NET 2008 vs. C# 2008 - Round 1

OK, so if you don't already know the Costoda is taking a VB programming class. Ok I know a lot of you are already thinking, WTF - how is he going to last in that class and whom is that poor professor that has to deal with the Costoda for 18 weeks? Well to start, the instructor is really cool, although I do feel sorry for him.

So according to Microsoft the only difference between VB and C# is syntax because everything is converted to MSIL. Ok I will drink this kool-aide. So I start up Visual Studio and make a new VB project. I make some private vars and then make my first method. I go through and type in a new method that I haven't created yet, expecting to use Visual Studio's awesome refactoring tools to generate a stub method. Right click on the name, what's this, NO CREATE stub method... WTF!!! So next I take some code and release that really this code should be in another method, so I select the code and go to right click on the code and refactor it to another method, and NO refactoring menu option. WTF!!! Come to find out, these are only available in C#. Wait, I though they were the same except for syntax. True, but Visual Studio's editor doesn't think that way. Instead C# get's all the cool features in Visual Studio... Oh they are equal, R.I.G.H.T.

Next WTF is up with the complete different terminology for stuff like static, I mean Share. Another example is this whole Me vs this object. C++/C#/Java I get the 'this' object, in VB that's the 'Me' object. Then I see this Dim is sometimes private and sometimes not. I see this crap all over the place. How do VB programmers talk to C# when you have all this damn terminology crap that makes a barer between the two. But wait, they are equal. R.I.G.H.T.

Ok so my conclusion is that they are NOT equal until I can do the same crap in my VB project in Visual Studio as I can in C#. Until then, VB.NET is always going to be some kind of candy language given to VB 6.0 programmers so they don't jump ship to Python and open source.

-Costoda

2 comments:

Unknown said...

Download Refactor! for VB. It's a special version of Refactor! Pro licensed by Microsoft for all Visual Basic developers working in Visual Studio 2008 and 2005:

http://www.devexpress.com/VBRefactor

This includes 27 refactorings (compare to the seven you get in C#).

BTW, CodeRush (also from DevExpress) lets you code in both C# and VB efficiently using the *same* keystrokes in both languages. So if you're going to work in both languages, you should definitely check this out.

http://www.devexpress.com/CodeRush

(details plus links to eval downloads are on that page)

Unknown said...

Mark - thanks bud, that link ROCKS. I still think MS needs to make the products equal and that means what ever tools are available in C# need to be available in C#. Then again after this class the chances of me touching VB.NET are pretty slim. I'm too much in love with the C/C++/C#/Java syntax I've been using for 12+ years to go back. Yep I drank the "I like to read complex code with semi-colons" kool-aide a long time ago.