Saturday, December 15, 2007

VB: The 800 lb (363 kg) Gorilla in a C# Fanboy World?



In show #92 of Hanselminutes, Paul Vick mentioned something that really surprised me and others. It wasn't the fact that Visual Basic .NET Express Edition is the most downloaded Express Edition, but that the C# Express Edition was a distant third behind C++.

I trust Paul's data, but what could explain this? Does this simply mean that the majority of .net programmers have professional Visual Studio licenses or does this data reflect the real usage as a whole?

When I was in college and .net just came out, I immediately jumped into using C# 1.0 because I was immersed in Java and C++ programming at the time. After graduation and starting working in the "real world," I drifted more towards VB.NET (when writing managed code anyway) because I was doing quite a bit of COM interop with Office and I despised the fact of having to explicitly declare "missing" parameters to the methods of the Office object model. Furthermore, I thought that the VB syntax was easier to maintain. I even defended the decision saying that great projects like DotNetNuke proved VB was a viable language.

After a few years though, I drifted back to C#. More than anything, I came to admire its terse syntax quality. While VB has no problem with things like "End If", C# simply says "}" In the latest generation, it's more of the difference between the lambda syntax of "Function(x) x + x" versus "x => x+x".

Maybe there's something to be said about the last statement? Maybe C# attracts those that just prefer terse notation? I'm sort of reminded of 16th century mathematics when solving a cubic equation (e.g ax^3 + bx = c) was all the rage. What's most impressive is that this was done using rhetorical methods instead of modern algebraic notation that would kicked off by Vi├Ęte a few decades later.

I don't mean to imply that VB is inferior. I owe a lot to BASIC, it was GW-BASIC that got me started in my love of programming. It's just that VB (and BASIC in general) has a rhetorical quality of being easier to pick up since it looks closer to natural language rather than the symbolic mathematical world. This is probably why lots of people are using it to get started programming. I think that's fantastic since it brings more people to the .NET platform. Sure, they might be "spreadsheet gurus" who started in VBA, but at least they're learning.

Maybe we can learn from the three thousand years of the evolution of mathematics. It wouldn't surprise me that in 15 years, a language like F# ranks third place or higher. Maybe the popular language will be closer to Sun's Fortress?

What do you think? Were you surprised that C# ranked third? Will terseness win out? Feel free to comment.

UPDATE: When I wrote this post, I forgot about Paul's post on "The silent majority." It and its comments are a better discussion of the topic than I gave it.


kick it on DotNetKicks.com

11 comments:

Mike Petry said...

Inconceivable!
I am only mildly surprised to see VB.NET as number 1. VB has always been a good language to know on the Windows platform due to its various incarnations (VB.NET, VBA, Classic VB, VB Script). But C++ as number 2 is a total surprise! C++ Express does not support the classic C++ frameworks such as MFC and ATL. Developing a GUI-based app in C++ Express requires .NET which is fine, but I didn't see much difference between C++.NET and C#, in a pure .NET setting. I guess you can say that C++.NET is just C# with a hat (get it?).
Herb Sutter blogged about how VS 2008 C++ Express Edition will be updated to include TR1 support sometime later next year. I probably will have to check it out. It will be a lot of fun to check out the boost-like capabilities in TR1 using the slick VS IDE.

Jeff Moser said...

It makes me wonder if people are just downloading C++ Express to work on class/homework assignments or maybe to take advantage of its good native code compiler?

I honestly thought VB and C# would be within 10% of each other. Visual C++ is definitely very alive and it's good to see Microsoft is investing in the language and platform beyond VC++ 2008.

Anonymous said...

While Paul's information is probably spot on, it isn't reflected in the marketplace reality.

Do a search on Dice.com for vb vs c# in any given local and you'll see that c# wins out handily.

I am guessing that the reality is that most c# get their VS installs from MSDN or their company buys it.

Jeff Moser said...

Good point. However, it makes me wonder what the majority of the under 18 crowd is going for. That is, which one is closest to my "GW-BASIC." Although Alice is nice, I don't think it's of GW-BASIC status. It's just not the same.

How much efficiency could be had in this world if more people (of the "spreadsheet guru" type) knew a language like VB.NET. This would leave more interesting problems for the C# & F# crowd.

C#'s step-father said...

This is no surprise. VB pwns C# and always will. Nobody wants to code in some case-sensitive, curly brace ridden, semi-colon infatuated cryptic code. Looking at C# makes me want to vomit.

Jeff Moser said...

Interesting feedback. I take that you like the more verbose syntax of VB?

I think to some it's a matter of taste and the more rhetorical nature of VB wins out.

I think they can coexist. VB probably head towards the more dynamic language style with VB10 and higher and C# will stay true to its C syntax heritage, but will also keep stealing from F#.

Anonymous said...

I would assert no one knows which is more popular as many developers simply download VS. However, IMHO, C# is more consistent and coherent as it doesn't carry the historical baggage VB has. C# was designed from scratch which gives it an advantage. Even the VB team architect mentions this disadvantage.

Jeff Moser said...

Great perspective on the historical baggage. As a former Delphi programmer, it's good to see that Anders took the good from it and added even more good ideas into C#. It's much more consistent than VB since it's had one principal architect from the start.

I think it's good to deprecate obscure heritage, like Paul's mentioned doing already which will help clean things up a little. However, with Microsoft so focused on compatibility, it'll be a slow road. That is, much slower than starting fresh.

Anonymous said...

In theory, it is a matter of personal preference but my experience is that developers like C# and management prefers VB.NET, and no, they won't let you choose both.

Both languages lack the intuitiveness and good documentation that Delphi had.

Jeff Moser said...

anonymous: Interesting. I worked with Delphi in the late 90s (2.0) and sort of see it as an early C# with Pascal syntax. What do you think makes Delphi more intuitive?

Anonymous said...

Maybe it's just me but I found C# often has three ways to do something but two of them don't work, including the most obvious way.