Why C# Is(n't) Better Than VB.NET
This is not a bash at C#. I like C# just as much as VB.NET and do development with both languages. I’m even thinking of getting this tattooed on my forehead.
I’ve normally listen to .NET Rocks! during the live broadcast on Thursday night but I’ve been quite busy lately and I missed the last few shows. I got the inspiration for this post while I was listening to the show with Jeff Richter last night.
About 5 minutes in to the second half mp3 (I download the split versions of the mp3 so I can burn them to CD and listen in the car (yes, I know that’s really geeky (yes, I know that’ll make it hard for me to ever date again (can I please get on with the story?)))). Anyway, about 5 minutes in to the second mp3 came the time for Google Weirdos but instead of the normal search engine insanity Rory did a tongue-in-cheek “Top 10 Reasons Why C# is Better Than VB.NET”. Included in the list were things like C# has threading, C# has delegates, C# does Interop and so on, basically playing on the still too widely held misconception that C# is the superior .NET language and that it has many capabilities that VB.NET does not.
What followed next was what got my blood boiling. Carl asked Jeff (Richter, the guest) what he thought of the Top 10 list and what were his thoughts on VB.NET. During the two or three minutes of discussion Jeff said two things as if they were fact. First: that C# is inherently faster than VB.NET and second: that in the future VB will diverge from C# and become a RAD tool that sacrifices performance for rapid app development. Both of these statements are false.
The reason this upset me so much is that Jeff is very well-known and respected in the community (he wrote the book that taught me more about .NET than any other book I’ve read, Applied .NET Framework Programming by Microsoft Press), so when he makes statements like he did on the show people will take them to heart.
On the next .NET Rocks! (a really great show on SQL Server with Kimberly Tripp) Carl had Jay Roxe and Paul Vick from the VB team come on and discuss the comments Jeff had made and provide some rebuttal. Jay and Paul come on about 20 minutes into the first mp3, a very worthwhile listen.
To tie this all together I recently taught a 4 day C# programming class here in Toronto. Out of 22 attendees more than half were VB Classic developers moving to C#. When I asked them why they had chosen C# instead of VB.NET they said that management or a consultant told them that C# was the superior .NET language, C# has capabilities that VB.NET does not, C# is inherently faster and so on. Two of the developers in class who had some VB.NET experience realized by the third day that there was very little difference between the tools and I’m sure the others will over time as well.
As I said in my note at the beginning I like both languages, I use both languages and I teach courses that use both languages. What upsets me is that people continue to spread the myth that C# is superior basically because it has the letter C at beginning of the name usually at the cost of the VB Classic developer.