One of the things I love about Visual Basic is that the syntax is similar to natural language. This basic design make the code so much easier to read and elegant to me.
These are often words used to describe C or C#, but beauty is in the eye of the holder.
For example if I wanted to tell you about Sam I would say something like:
Sam is a man
I would not say
Yes. This is less words but it goes against the natural grain of how I talk and how I think. First I define what I am talking about, Sam. Then I define what Sam is, a man.
Would anyone say that my second sentence is any clearer then the first or easier to read?
Why do some people insist that code should be written different then people naturally speak and think? Why shouldn’t I write code for my sentence as:
Dim Sam as Man
Why make it say:
Just to save a few lousy keystrokes? If developer productivity is the goal then why case sensitivity?
Maybe I am just weird but when I write with pen and paper I print, and I still print in all upper case. My second grade teacher is probably rolling over in her grave right now, but yes I write in all upper case. I have seen others and I know I am not alone.
Maybe it is my wacky handwriting style but I just don’t get case sensitivity in a development language. I don’t see how having two variables named Counter and counter be different variables is a good thing that should be allowed. It just seems like a receipt for bugs and runtime errors. One missed press of the shift key and there goes the application.
“;”, my pinker finger is the weakest finger on my hand, enough said.
I am sure my email box will be filled with lots of mail after this entry. My intent was not to start up the language wars or to belittle C based languages. In fact my intent was the exact opposite. Visual Basic’s syntax works like my brain thinks, not everyone processes thoughts in the same way. Diversity is great in life and it is great in development. Use the language that works best for you and works the way you work. That's why I use Visaul Basic, because it more natural for me. I can write C# when needed but I prefer VB when everything is equal.
Maybe case sensitivity, semicolons and other differences make perfect sense to you; I have no problem with you being different. I do have a problem when people start to claim to have spoken with the coding gods and know the one true language all developers should use.
If I read one more person saying the C# is the language of .NET or the language that everyone should use I am going to scream. You want to know why lots of Microsoft folks demo in C# and not VB? The answer is not some grand plan or any reflection of our product road map. The reason is simple, most Microsoft products before .NET where written in C++, most Microsoft developers are C based developers so they demo in a style that they are comfortable in.
Why are commercial .NET based products from us like MSCRM, Sharepoint, and SQL Reporting Services in C#? The same reason, these teams used to write their software in C++ so they naturally moved to C#.
Loads of internal software at Microsoft is written in Visual Basic 2003 and now 2005, why? Same reason, because these teams used to use Visual Basic 6.0. (FYI – If you did not know part of the .NET Framework is written in VB with even more of the 2.0 framework in VB).
Most people program in C# with .NET, right?
Here are two simple thoughts for you, I would strongly bet that downloads of VB Express are higher then C# Express. I also have a strong feeling that the VB Dev Center gets more traffic then the C# Dev Center.
Now stats can be bent to serve any point. There are many, many C# developers in the world, my point is not VB is a superior language or C# is not widely used by lots of people but simply don’t write VB off anytime soon folks. It is very alive and kicking.
While I am on my soapbox if one more person says VB is just C# without the semicolons I am going to go off the deep end. I would argue the exact opposite, C# is VB with semicolons!
Why look at the changes from C++ to C#. Managed memory, compiles to IL that runs against a runtime, edit and continue (in 2005), drop and drag Windows Forms designers, use of reusable components likes grids, no pointers, etc, etc. Doesn’t this sound like a lot of things that VB has done for years? Isn’t the CLR a lot like the VB runtime (on steroids). What did VB got from C++ things like i += 1.
IMHO the entire .NET development space has more in common with VB 6.0 than it does with C++. Yes, it is have evolved since VB 6.0 and is different in some ways, but it is a lot more like building a Windows Form application in VB 6.0 then compared to building the same thing in a prior version of C++.
C# is great language for people that like C based language but for those of you that take this way to serious get off your high horse and stop claiming some sort of moral superiority. Development is about using the best tool for your team to solve the business problem at hand; it is not about religion, world domination, or beautify crafted classes that took you months to design just because you wanted to feel smarter then someone else.
To the thousands of C# developers that get this point, love what .NET gives them and love the C# language because it works great for them, keep churning out great applications and thank you for not lecturing me on using Visual Basic or trying to tell me it is a second tier language.
Ah, I feel better now.
Like I said, to all of the C# developers that come to work and solve their problems with the tool they like best, more power to you. Let’s all just live and let live in this whole VB / C# debate as it is a pretty much a waste of time. Really aren’t there better things in life to spend our energies on?