Scott Hanselman

VB.NET and C# - Duplication of Effort?

January 18, 2006 Comment on this post [11] Posted in Ruby | Tools
Sponsored By

Patrick Hynds recently used a military analogy to contrast C# and VB.NET and their growing and increasingly obvious similarities. (I've always thought that the differences were just skins over IL myself.) Rocky Lhotka extended the analogy brilliantly:

The problem we have today, in my opinion, is that C# is a flying tank and VB is a heavily armored attack plane.

Microsoft did wonderful things when creating .NET and these two languages - simply wonderful. But the end result is that no sane person would purchase either a tank or an A-10 [ed: a plane] now, because both features can be had in a single product. Well, actually two products that are virtually identical except for their heritage.

Of course both hold baggage from history. For instance, C# clings to the obsolete concept of case-sensitivity, and VB clings to the equally obsolete idea of line continuation characters.

Unfortunately the idea of creating a whole new language where the focus is on the compiler doing more work and the programmer doing less just isn't in the cards. It doesn't seem like there's any meaningful language innovation going on, nor has there been for many, many years... [Rockford Lhotka]

Personally at this point, I don't see a reason for us to have two languages other than we always have. It started with C++/MFC versus VB1/2/3 in the early 90s and we'll never come back together. Some folks think that this is good because humans crave choice. Others think it's just wasting time and effort as we design language and development tools twice.

There seems there's always a need to have vanilla out there to balance out chocolate. Take a look at Billy Hollis' Tongue-in-Cheek "History of BASIC" and "History of C." Personally, I'll write in any language that makes me productive. VB.NET, Ruby, C#, Zulu, Amharic or Spanish. It's all just a way for us to express our intent to the machine.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
January 18, 2006 3:14
I've worked for companies that required VB.NET, and ones that have required C#. I honestly don't really care either way, and maybe it's just me, but VB.NET reads easier in my opinion. Working primarily in C# now though, I'm getting used to it again. For a long time I was a die hard VB basher, especially when .NET first came out, everyone jumped on the C# wagon. Now I can say I don't really care.
January 18, 2006 3:41
So I wonder what VB.Net looks like when written in Zulu ;-). Only you could truly answer that question, and how is that any faster than C# written in Spanish?
January 18, 2006 4:04
There's lots of anecdotal evidence that C# developers make more money than VB developers, and I've seen some stats that may back that up. Knowing what Twain said about lies, damned lies, and statistics, though, I'd take that with a grain of salt.

Financials aside, I know that in some circles, VB (even VB.NET) has a stigma attached to it (as John has already stated). I don't think that's a reason not to use a language, but it might help determine what skills one would want to stress on a résumé.
Cam
January 18, 2006 5:58
It's the same old problem. There is no perfect language. I really, really, really like Python's syntax (easy to read, yet not overly verbose) and it's cool built-in data structures (dictionaries, lists, tuples). And I like the idea of IronPython (.NET) because you now get to leverage the CLR using a cool language. But honestly, the VS.NET IDE makes C# so dang easy, I won't get really excited until a solid plug-in is in place for IronPython. Even then, it's clear to me that for certain large scale systems, C#'s formality could be useful for preventing things that lesser minded individuals might screw up using Python's approach (myself included in the lesser minded category). Plus, with dynamic languages like Python, it's essentially impossible to truly build in the same level interaction that VS has with C# or VB.

But thinking of Ruby and Python and Boo etc... I don't think there is a lack of meaningful language innovation going on. On the contrary, I see the projects melding these languages with the .NET platform as a significant step in programming language innovation. The greatest challenge right now is finding "good" ways to represent and handle features in the platform within the language without destroying consistency.
January 18, 2006 7:35
I can't find a good reason for all discussions that are about VB and C#. I think that it's a personal choice.

I started programming when was 10 with GWBasic and followed all versions up to now. Also I worked with C and C++ but choosed Basic family as my primary choice.

I can use VB and C# both but use VB because it's my favorite. One the other hand most of .NET developers are familiar with both languages. For example in Pro ASP.NET 2.0 in some chapters you used just C# codes and it doesn't matter for me because easily switch to C# and use them without translating to VB.

Anyway I think that we would know that as we have Java, Python and ... can have VB, C#, VC++ and J#. .NET is created to be an universal platform for these languages so Micorosft has agreed that each person has his/her own ideas!
January 18, 2006 17:18
I would hardly say that VB *clings* onto line continuation characters. I never use them, and the only time I see them used is when code needs to fit on a webpage.

Also, I don't think Microsoft cares if you buy both--as long as you are developing for the Windows platform. They are just giving you an option to talk to the computer in a language you are comfortable with. I program in both languages but I use VB.net most often because I have a VB6/VBScript/QBasic background. Most C/C++/Java programmers will go with C# just because they are familar with it.
January 18, 2006 19:21
The choice of language used to be a tradeoff between development time and execution speed. Thanks to Moore's law, execution speed is now fast enough 99% of the time. I think the tradeoff in language choice now is between speed of development and maintenance costs. Perhaps we still need two languages for this tradeoff.

Language 1 should sell itself as the language that is fast to develop smaller applications in, and incorporating ease of use features from scripting languages.

Language 2 should sell itself as the language to create maintainable applications, incorporating strong object oriented features and built in unit testing.

January 18, 2006 20:18
You make a good point, Richard, regarding the tradeoffs in modern languages. I would point out that it's not Moore's law in play with C# and VB.NET, since it's all compiled to the same MSIL.
Cam
January 19, 2006 4:05
I really can't take someone seriously when they make silly claims like case-sensitivity being an obsolete concept.
January 19, 2006 18:21
Let me know how that Amharic compiler works out for you.... :-)
January 21, 2006 7:01
I think microsoft should push forward more to have a scripting language which can be tightly integrated and used in .net like groovy in java... which is easy, clean, oo, and support FP as well

I know there is ironpython but i am not sure how is current status and how much support ms plans to ...

Comments are closed.

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