Lhotka’s Post is Pointless – Please Get Rid of VB Microsoft!

Technorati Tags:

I was reading my incoming mail today.  Got another .NET Insight email.  Decided this time to read it and not push it off to my article folder in Gmail.  One of the first lamest articles I’ve ever seen from Visual Studio Magazine which definitely can have good articles, was “hotka’s Labyrinth: The End of the Language Wars”. 

What’s the point of this post?  How does this benefit anyone?  It’s a null point. He claims that this will end the wars against which language is better because .NET is language independent.  As far as I am concerned (someone who started in VB.NET and moved to C# thankfully), this is not the end and language DOES matter.  The syntax makes my life easier and more productive in terms of typing AND reading (“oh boy here we go again” you may say...but it matter!).

You see VB.NET is a verbose pile of **** especially as new languages have progressed.  And it’s the truth (now let me here all the flames come in).  There’s absolutely no need for the VB language anymore.  For God sakes, now we have VB, C# and F#.  Lets trim out VB please! 

It reminds me of another point…why do we still use these in US currencypenny ?  It’s pointless and just fills my pockets with unnecessary bulk just like VB.NET fills your classes with overly verbose code to make the compiler happy and a fake sense of “being easier” to those developers who have never had the opportunity or tried to use C# instead.  And for some reason, there are managers who are intimidated by C#’s syntax and the {} which I just do not understand.  It’s a naive view because they most likely have never tried C# to make that statement.

Microsoft feels obligated to continue to support VB not because people have used it in industry, but because Bill Gates still wants it because he is stuck on it.  All their apps are coded in C or C# anyway internally I believe for the most part. Most developers who have had to code in C# (came from C++ or not, or did not and moved to it) don’t want to touch the verbose pile VB ever again.  If they can both do the same thing, why the hell do we have VB?  Cause it’s easier syntax?  I can tell you that you are blinded if you think this is true.  Try moving to C# then back to VB.NET and you have to add so many words to your syntax that you’ll get carpel tunnel in a matter of minutes.  Make everyone convert their pile (VB pile that is) to C# if they both can do the same thing so we can all just work with cleaner less verbose piles of code.

This war is not over until VB is laid down to rest forever as far as I’m concerned.  It's overly verbose and the goal of new languages is to be just the opposite.  I'm also fine with Java, php, and others because they are not nearly as verbose as VB.

examples (from another very old site) :

C#

VB.NET

string a = String.Empty;

(21 chars)

 

Dim a as String = String.Empty()

(27 chars)

while (c < 10)
  c++;

(15 chars)

While c < 10
  c += 1
End While

(21 chars)

int[] nums = {1, 2, 3};
(18 chars)

Dim nums() As Integer = {1, 2, 3} 

(26 chars)

delegate void MsgArrivedEventHandler(string message);

(50chars)

Delegate Sub MsgArrivedEventHandler(ByVal message As String)

(55 chars)

void TestFunc(int x, ref int y, out int z) {
  x++;  
  y++;
  z = 5;
}

(48 chars)

Sub TestFunc(ByVal x As Integer, ByRef y As Integer, ByRef z As Integer)
  x += 1
  y += 1
  z = 5
End Sub

(77 chars)

\r    // carriage-return
\n    // line-feed
\t    // tab
\\    // backslash
\"    // quote

 (10 chars)

vbCrLf, vbCr, vbLf, vbNewLine
vbNullString
vbTab
vbBack
vbFormFeed
vbVerticalTab

""

(74 chars)

 

public int Size {
get {
    return _size;
  }
set {
    if (value < 0)
      _size = 0;
    else
      _size = value;
  }

  (71 chars)

Public Property Size() As Integer
Get
    Return _size
End Get
Set (ByVal Value As Integer)
    If Value < 0 Then
      _size = 0
    Else
      _size = Value
    End If
End Set
End Property

(130 chars)

(carpel tunnel is creeping in!

AND my eyes are hurting from reading code)

The red I added semi-outlines of some of the the extra what I call “fluff” that you just do not need and do not have to put up with in C# or other languages.  You multiply these extra chars, lines, and just compiler required trash per page, and you’re wasting your time as well as it’s just a pain in the ass to read.  One might argue that the C# syntax requires an extra ; but so what!!  Sure beats writing 1/3 of the page with more chars!

If they both do the same thing and I had a choice, why the hell would I pick VB when it just makes more work for me both in readability and code?   I like my classes as tight as possible, and as less code as possible.

Please, if you ever have a choice in your career or as a team (on the MS side), please do yourself a favor and go with C# and just forget VB even exists.  You will find in about 2 weeks transitioning over to C# is actually much easier.  I’ve experienced it.  This illusion that C# is some sort of harder language is just not true.  You will not get this until you get out of your VB world and try it for a couple weeks.  Looking up any of the examples above you’re gonna find that hey, really it’s just less characters mostly for C# and minor difference otherwise that takes no learning curve at all!

For those who read my blog don’t let this offend you, but I have a real strong opinion where VB can be put, and that is in the grave.  Rest its little soul.  It’s pointless to have around when they “both do the same damn thing”. 

Again, this comes from someone who has experienced the change and wonders why the hell MS still supports VB.  It DOES matter to this programmer and to a lot of others out there who have been there and know what I’m talking about.  Angry about VB?  I guess yea I am at that point with VB, I’m really tired of seeing it around.


Print | posted on Tuesday, December 16, 2008 9:55 PM

Comments on this post

# re: Lhotka’s Post is Pointless – Please Get Rid of VB Microsoft!

Requesting Gravatar...
I actually think your post is pointless; all you have done is state YOUR preference and explain why.

Personally, I do not care to read fiction books, and have many reasons for this. Not the least of which, I find many to be a waste of time and get no real joy from most. That being said, I am not pretentious enough to believe that my tastes are the same as others. Apparently, you are pretentious enough.

I also will never buy a red car and question why people do. Again, that is me, but I do not think they should be outlawed.

Like you I prefer C# and am generally annoyed by the verbose nature of VB. That being said, VB does actually make certain tasks easier (events, certain xml etc.) and it is a preference and people process language differently. At the end of the day, I think being able to mix and match, with it essentially being the same thing underneath is not a negative. If you want the Java experience, go do that. You can then have your one language to rule them all, and to hell with what other people might prefer AND perhaps mentally process better.
Left by benb on Dec 16, 2008 10:30 PM

# re: Lhotka’s Post is Pointless – Please Get Rid of VB Microsoft!

Requesting Gravatar...
Fair enough and I respect your reply (I expected to get some disagreements and different responses in terms of opinions here). But who wants to keep track of 2 sets of syntax for the same framework when one of the sets is just very hard to read and very verbose in nature. I certainly do not and I think those languages that resemble VB in any way should just be retired.

VB is easier? I really will agree to disagree on that point.

Java? Don't want to touch it.

I just don't like coding in a pile of syntax which is overly verbose and I'm sure a lot of developers feel the same way especially now when we have a lot of shortcuts like Lambada expressions and ways to make code shorter line per line.

Again, it's your opinion and my opinion. But I think mine has more bearing when talking specifically about VB.NET being something that really we just do not need around.

>>>Apparently, you are pretentious enough.
Obviously everyone has preferences.  But there are certain inefficiencies I can't tolerate having moved to a language syntax like C#.  So, let me put to rest your assumption in that I understand my preference is not the end all, and this is my opinion which is just that and why the post is tagged with "Rant".  However I would not want to work in environments or with clients utilizing VB.NET if at all possible.

>>>You can then have your one language to rule them al
That's not what I'm looking for, I'm not that type of developer.  I'm not an egoistical prick like some developers and some developers get burned out when too many new languages get introduced too often.  But I do have a strong opinion about the VB language being a pile.  Would not mind diving into F# as well, looks like a nice compact language in terms of syntax. In fact on the contrary I'm a bit irritated that Microsoft keeps coming up with new languages all the time (latest being now F#) instead of improving on existing languages like they are with C# 3.0, etc. 

Also, I have stated my opinion and given several solid examples.  I don't have to give an opinion just to prove a point, it's the truth based on experience using both and you just openly admitted to also being annoyed at the VB syntax so point proven in your reply.
Left by Dave Schinkel on Dec 16, 2008 10:45 PM

# re: Lhotka’s Post is Pointless – Please Get Rid of VB Microsoft!

Requesting Gravatar...
I must say that THIS is one of the lamest articles I saw!! No offense though.

For me, there is nothing like prefering C# over VB because I hardly used VB and have been using C# for like more than 6 years now. I can program in VB, no doubt but I hate it so I won't. But that doesn't mean I start saying that Microsoft should kill VB?!! Everybody have their preferences and if they are happy with VB what is your problem? You don't like VB, don't code in VB, as simple as that.
Left by Yogesh on Dec 17, 2008 3:21 AM

# re: Lhotka’s Post is Pointless – Please Get Rid of VB Microsoft!

Requesting Gravatar...
Personally I am a big fan of C#, but having said this the language i code is not the point. You talk about number of keystrokes as one of your main issues with VB.
I would challenge that this point is worthless. With tools like R# or CodeRush i cannot remember the last time I wrote out an entire if statement, or for loop or hell even declared an entire variable. I let these tools do that for me and i move on.

Also, the various language each have their own pros/cons. The days of C# as being 'the' .net language are numbered. Just wait, in 2-3 years the cool/hip language will NOT be C# it will be something else, and it will not matter because as long a we are using the .net CLR/DLR we are all good.

Sorry buddy, but get over your 'i hate vb' issue and move one.
Left by Derik Whittaker on Dec 17, 2008 6:27 AM

# re: Lhotka’s Post is Pointless – Please Get Rid of VB Microsoft!

Requesting Gravatar...
The problem is this:

1) This is not just a "preference", it's productivity and readability. Again, it's not just keystrokes but reading a page of code in VB is just a lot more for the eyes to take in and especially when you have environments where there is any spaghetti code (thankfully I have stayed away from them mostly) then it's even harder to read with VB syntax because there is just way too many unnecessary words.

2) I've known places that have completely forced a change from VB.NET to C# because of my reasons. And it did not slow us down.

simple as that. It matters. I use R# but shit, I don't rely on a tool to code for me. While it may be a great thing, what if I do not have R# for whatever reason. The point is, VB is an added bulk to the code culture that just is really makes no sense for it to be around when we have languages like C#, F#, and yes, "whatever is down the road" because those new languages would never resort back to a syntax like VB.NET because people hate it.

This is not an ego thing, this is not a "I have a hard on for C#". I look at it from a usability, readability, and actual experience having to code both and coding in VB.NET and reading VB.NET SUCKS.

I am definitely not the only one who feels this way. In fact there are many developers I have met who understand this.

If an environment was using F# or "something else" I'd be fine with that because it's not going to be an overly verbose hard to read pile.
Left by Dave Schinkel on Dec 17, 2008 6:42 AM

# re: Lhotka’s Post is Pointless – Please Get Rid of VB Microsoft!

Requesting Gravatar...
@if they are happy with VB what is your problem

Because

1) I have to deal with it, code in it, and read it if I get into and environment which is using it

2) Half the jobs out there are VB.NET. They are VB because the developers have this misconception that VB is easier and C# is just harder. That's my problem and I get tired of the job market being half VB when there are lame reasons to use VB over OTHER languages like C#, F#, and so on.

Tell me why VB.NET should be around?  Because of preference?  For that matter lets talk about F#.  It has at least features that make sense why you could keep it around.  VB, on the other hand is just syntax sugar that make developers for some reason feel that it's easier to work with.
Left by Dave Schinkel on Dec 17, 2008 6:46 AM

# re: Lhotka’s Post is Pointless – Please Get Rid of VB Microsoft!

Requesting Gravatar...
Readability is in the eye of the beholder. To me C# is an unreadable cryptic pile of ****. Curly brackets do nothing for me and semicolons even less than that. I would much rather see and 'end if' than a '}' that goes with who knows what. Using verbosity as reasoning is bull too. With intellisense and proper naming conventions it's a mute point. Besides good code is good code no matter what language it's written in and the reverse is true too. In my opinion I think VB reads more naturally and for that reason tends to be more self documenting if done correctly.

This argument reminds me of the old days in IBM land with the argument between RPG and Cobol. Nobody ever won that argument either.
Left by Rick E on Dec 17, 2008 9:54 AM

# re: Lhotka’s Post is Pointless – Please Get Rid of VB Microsoft!

Requesting Gravatar...
Like VB or not, I think that Microsoft would do well to kill the language and let developers move out of the VB world and get on with their lives.

I think C# and VB.NET are two ways of saying the same thing, that there is nothing you can say in VB that you can not say just as well in C# and that perpetuating two languages when one would do fine, just dilutes the efforts in adding functionality and clearness to the code written in the language.

Consider the fate of J# and JScript.NET. They were killed and everyone moved on from there. The biggest problem with these two languages was simply that they were so close to C#, inventing a new way of saying the same thing was hard. The same is happening in VB. You can't add a feature in C# without adding it in VB, but then you have to invent a new way of saying it in VB (and this is hard when everyone already understands the way it is said in C#).

So, like it or not, when two languages are there to solve the exact same problems, I don't really see why you need two. It just makes everyone's life harder in the long run, including developers, tool providers and language implementors. For this reason, I do think that is it reasonable for microsoft to kill VB (like they have killed a number of once promising technologies).

cheers,
Left by dennis sellinger on Dec 17, 2008 2:51 PM

# re: Lhotka’s Post is Pointless – Please Get Rid of VB Microsoft!

Requesting Gravatar...
"I think C# and VB.NET are two ways of saying the same thing, that there is nothing you can say in VB that you can not say just as well in C#"

XML literals. I saw that this weekend just messing around with Linq to XML. I came across an article on it with sample VB.Net code and was pissed I couldn't do it that way in C#.

Microsoft continues to add little features the IDE for VB.Net developers that C# devs don't get...
Left by Aaron on Dec 17, 2008 3:29 PM

# re: Lhotka’s Post is Pointless – Please Get Rid of VB Microsoft!

Requesting Gravatar...
When you say "I’m very tired of going to the MSDN library and seeing examples of both in every page" do you mean MSDN Help rather than msdn.com? Because in Help there's a dropdown at the very top of the page, just under the URL box which allows you to deselect everything except C#. Yay!

Incidentally, when I moved to .Net I swore never to touch VB.Net - I was scarred by that *&^%$£?! VB6 MessageBox which popped up every time I typed

If x = 1 {Enter}

rather than

If x = 1 Then {Enter}

.. not to mention VS6 Help loading in it's usual soporific way because I moved the focus on the MessageBox from OK to Help. What's the point of the Then? Talk about spurious.

Also incidentally, I don't think anyone's mentioned case-sensitivity: some people just can't do it, fair play to them, they have to stick with VB. Poor saps.

Finally incidentally, the {} in C# are often optional, notably in conditionals and loops, but only a fool doesn't use them every single time - how many times do you have to get bitten by a bug caused by adding an extra line to a single-line unbracketed If or Else statement before you bite the bullet and use them automatically, or get VS or Resharper to do it for you. WHich of course is why StyleCop - http://code.msdn.microsoft.com/sourceanalysis - enforecs the every-bracket-rule. Oh, for one last incidental, StyleCop is only available for C# - like lots of other tools, another thing you didn't mention.

--fw
Left by Flame Warrior on Dec 17, 2008 7:18 PM

# re: Lhotka’s Post is Pointless – Please Get Rid of VB Microsoft!

Requesting Gravatar...
I agree that VB.NET needs to die a painful death...especially with F# coming out. VB.NET serves no purpose anymore and this is coming from a completely different perspective: because of Microsoft's new faster iterative releases there is MORE beta code than ever out there (Silverlight, VS 2010 stack etc, next SQL Server). I would say 90% of those developers who work on beta code in .NET are C# developers. To me this makes C# the language for me to learn new technologies and thus the language to remain coding in.
Left by Bart Czernicki on Dec 18, 2008 12:17 AM

# re: Lhotka’s Post is Pointless – Please Get Rid of VB Microsoft!

Requesting Gravatar...
I agree VB and VB.NET deserves to be eliminated for eternity IMO. No offense.I don't program in VB and VB.NET. But I can easily adapt on C# sharp environment because the syntax is identical to C/C++ and Java(It seems 85% derived from java). Yes VB/VB.NET is a heavily verbose language and I hate it. VB syntax is annoying..
Blah blah... end blah begin blah. I cant concentrate to the problem because of those annoying extra words that still to be code.
For me the arrival of vb is a big mistake.
Rest in pieces microsoft. :)
Hate me if you like. You love VB? go ahead code in it. Its not my problem any way. And none of my business.
Left by Jack Spicer on Apr 15, 2009 2:45 AM

# re: Lhotka’s Post is Pointless – Please Get Rid of VB Microsoft!

Requesting Gravatar...
>>>ts not my problem any way. And none of my business.

It is when you have to deal with it when half the employers out there use it. It's not a language that we need around.
Left by Dave Schinkel on Apr 17, 2009 10:49 PM

Your comment:

 (will show your gravatar)
 
Please add 8 and 2 and type the answer here: