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 currency
? 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