As you may remember, last year I moved from VB.NET to C#. This year, it looks like I will be doing a lot of work in VB.NET. Some of the people I told this to acted like I said I was forsaking my family and joining a whacky cult in Nepal or something.

If it was coming from Java or Ruby or PHP folks, I could understand -- VB.NET is sufficiently different in philosophy and style from those languages for there to be a point of contention -- but the people who seem to hate VB.NET the most are C# developers. I just don't understand.

When I made the move to C#, the final motivator was not a deficiency with VB.NET, it was the fact that I was working on customising a product that was already written in C#. Re-reading that article from June 2008, I had no overwhelmingly good reason to stop using VB.NET; on the whole, it was meeting my needs. Most of the pressure that I was feeling to start using C# was social pressure from other developers. In the .NET world, it feels like VB.NET people are often considered to be less capable or less experienced than C# developers, or that C# is a substantially better language than VB.NET.

Don't mistake me here; I know where the anti-VB sentiments traditionally come from. The VB family up through VB6, VBA, VBScript and the other variants is a wretched language on all technical fronts. As far as I can tell, the only good thing about VB was that it was easier to get things done in it than the alternative at the time, which was C++. I was always baffled that VB beat Delphi, which was just as easy to use and much better on a technical level.

But folks, pinning the sins of VB on VB.NET is factually unsupportable. Remember the stink that VB developers made when VB.NET came out? It's because VB and VB.NET are truly two entirely different languages that happen to share enough common syntax to be visually identical at a casual glance. I am not going to enumerate all of the differences between VB and VB.NET here; it would take a book to list all the differences. It is safe to say that, other than syntactic similarities, VB and VB.NET are different languages.

In fact, the language that most resembles VB.NET from a technical (not a syntactic) standpoint is C#. Thanks to the .NET Framework, VB.NET and C# have identical libraries; this means that anything you can do in one language can be done in the other in terms of library calls. At a functionality level, C# offers a few things that VB.NET does not (multi-line lambdas are a big one), and VB.NET has some features that C# does not (like optional and named parameters, which are important). In .NET 4.0 (which is coming out next year, if not sooner), most of these gaps will be closed. The typical business developer will probably never use something in C# that is not in VB.NET, or vice versa.

At the end of the day, the practical differences between VB.NET and C# are items that fall under the category of personal opinion. There is nothing wrong with that; some developers prefer a more verbose language like VB.NET, while some like one that is a bit more terse. There are pros and cons to each viewpoint. But to act like VB.NET is some pariah language and C# is the bee's knees ... that just does not make sense.

Cast your .NET This was published in Cast your .NET, check every Thursday for more stories

Comments

1

Darryn Parker - 12/02/09

I'm a C# developer who does look down on the VB.Net syntax and I find it takes a lot of time to properly articulate why that is.

I find Vb.Net produces a lot of 'noise' around areas where it doesn't need to making the code harder to decipher. E.g. End Sub, End Function, Dim person As Person.

I think that VB.Net suffers from the developer who implements it as well. Because the language is easier to read for newbies, they tend to write their first, second and third application in it and we all know what our first applications are coded like - terribly.

» Report offensive content

2

Tristan Lewis - 14/02/09

Almost for the reason that they are similar is a really strong reason to shout against vb.net - it means that any libraries that will work for the languages would have to be ported to both platforms. More time spent on working on vb.net is more time that isn't being spent on c#.

Have to agree on the syntax - primarly because their is no use of control characters - semicolons and braces make c# so much eaiser to read quickly.

» Report offensive content

3

David Grenier - 16/02/09

You make a big argument about how VB.NET is a different language than VB and how it is technically equivalent to c#.

But the problem about VB.NET, which is also what makes it similar to VB, is, again, it's syntax.

» Report offensive content

4

BobPSmith - 22/02/09

Ah, the C# crowd I gotta lova ya'. Confused by the differences in the languages? Don't like the syntax? Makes me laugh. Justin, nice writing but I'm afraid this one's been played out too many times, with the same result. They've imprinted on C so nothing else seems right :)

if vb.net = "sucks" then
c#="sucks too"
end if

» Report offensive content

5

Daniel Skinner - 24/02/09

Look basically unless you code in C/C++ and/or Assembly language, then you're just another half arse 'programmer' that couldn't even survive without all the JREs, .NETs, APIs, Intelisences, Enterprise Library, etc...
You losers are not real programmers, you are pathetic wanna-bees!
Go to school, get a degree, and code like a real professional, not some shameful kid that needs help every step of the way. Finally your programs stink (to the VB6 & VB.NET guys)! They are bloated, the always have bugs. They look crap, run crap, and basically you're just not smart.

» Report offensive content

6

Matt - 04/04/09

Mr. Daniel Skinner,

AMEN!!!

While I use .net (C#/VB) on a regular basis, they by no means can compare to C/C++ or Delphi! It's kinda sad what CS degrees have boiled down to. I truly pity the fools that spent tens of thousands of dollars to get a 'fancy' degree that has it's technical roots in .net.

For those who complain about VB's syntax, it's unfortunate that their minds cannot handle more than one abstraction.

.Data
myhammer DB ".Net sucks ass, don't try this on NT...",0AH,0DH,'$'
.Code
main Proc
mov ax,@data
mov ds,ax
mov ah,2h
mov ah,9h
lea dx,myhammer
int 21h
mov ah,04Ch
int 21h

» Report offensive content

7

GhostGum - 08/04/09

Dear Mr. Daniel Skinner & Mr. Matt,

You write your code as pure text & then let an app compile it into binary? lol, how half-arsed is that, I write purely in binary!

01101110
01101111
01101111
01100010
01110011

I pity the fool!

» Report offensive content

8

GhostGum - 08/04/09

I also dont understand why ppl use VB syntax. Much harder to read/understand than C# IMO.
Regardless of actual functionality being the same.

» Report offensive content

9

mike - 16/04/09

Personally I envy the amount of choice these comments imply. I agree with Justin's view that VB.net and C# are just about par. However I have mostly found that I don't have a choice on what language I can use to code and must adapt. In my own work it is very much horses for courses and if I need to knock out something fast I'll use VB.Net as a preference.
Good luck laying this one to bed though Justin!!

» Report offensive content

10

Jorge Arzola - 16/04/09

Who cares about your binary bull crap and your c++ professional language. look in the careers sites and tell me how many are hiring professionals that know binary and also assembly coding and c++ and all of that bull shit, maybe if you are working on some sort of mathematical super robot, or some kind of metor detecor for jupter will you ever need languages like that. Now a days we need super fast applications that take 1 to 2 weeks to have a mock up not three to four months writting your own library to create a button.

C/C++ are great for complex apps, but there is nothing wrong with writting applications in.net or any other API or library.

Yes we do survive because of that if not we would not be productive.

High pace world needs a high pace language and these languages are doing a great job in keeping up. Don't show off what you will never use. why don't you show off what you will.

private string _coders;

public string Coders
{
get { return _coders; }
set { _coders = value }
}
public string SetType()
{
//set the type of coders of the future
this.Coders = "VB.NET/C#/PHP/JAVA/Ruby/Python";
return this.Coders + " developer are the future of RAD. keep up!";
}

» Report offensive content

11

Markus Ewald - 24/04/09

I don't look down on VB.NET as a language, but most of the develoeprs using VB.NET recruit themselves from either the existing VB6 user base (and boy, have I seen crap in VB6!) and those looking for an easy entry into programming, which VB.NET promises.

From my point of view, the really capable guys are all somehow flocking to the C# camp. Maybe I'm biased, because as a C# developer, I naturally group with other C# developers, but for example, I remember not a single VB.NET user ever posting to the NUnit mailing list since the day I subscribed.

What I really look down on are those mediocre C/C++ developers who don't even know the basics of their own language (namespaces? boost? loki? huh?) but feel qualified to make statements about other languages. I used to be the local C++ template metaprogramming guru around, but I like the elegance I can achieve with .NET, so I slowly moved over.

» Report offensive content

12

Syl Omope - 28/04/09

You guys must remember that in the real business world, its all about rapid application development and deployment, in simpler words, Productive and .Net does many things but remains very good for the above.
So if you still write code in binary form then its time to consider leaving your little zone and embracing relality.

» Report offensive content

13

Louie Avila - 09/05/09

Justin, Good points on your article. I get frustrated at the young crowd continually goes back to "my language is better than your language". I am 44 years of age and have done my share of coding back from the dBaseIII, Foxpro, Clipper, JCL, Fortran, Cobol, DB3 days. Each language is a tool in our tool belt that we all can call up upon to provide solutions to problems and make money. Im sure we can all make crap or something wonderful using ANY language. Grow up people.

» Report offensive content

14

Mike Maddux - 27/05/09

VB.Net is a fine implementation of OO based upon extensions to the Basic language.

I have been programming since 1975 and making a living as a programmer and computer scientist, instructor all that time.

The "my language is better than yours" arguments are childish. The reasons to support multiple languages on the .NET platform have little to do with some perceived notion of which sytanx is better/easier and much to do with leveraging the knowledge base in the industry.

The fact that there are programmers that are productive today in Basic and that the language extensions are easier to understand than learning an entirely new language is more important to a project manager/architect than how "cool" c# or perl or ruby or any other language might appear to someone that only knows one or two languages.

The CLR/CTS of .NET means that VB.NET has the same underbody that C# has and can leverage the .NET libraries. That is the power of .NET and has little to do with the syntax of either language.

BTW, I presently program in C# and multiple languages, and teach VB.NET at the undergraduate level. I have seen bad - non-OO C++, and really good OO VB.NET. The disclipline comes from the programmer, not the language.

» Report offensive content

15

markebitecp - 14/07/09

Mike M

I coudnt have put that better myself -

To add its only ignorance that anyone would say that any .net language is better than the other - they all get translated int MIL.

But consider this all you moaners: There are more c# jobs than vb.net but... those that know both languages have more options...

I use both...

» Report offensive content

16

Cody Jones - 17/07/09

I myself use multiple languages when coding, and C# is my prime language but i don't have anything against VB.net at all. I'll admit, it was my starting language and chances are it was some of yours too. They're both strong languages just case some has some unnecessary stuff that you think is pointless doesn't mean it doesn't have reason. End Sub, End Function etc. is really good for people just getting in programming to get it through there head you must have an end on everything. I've actually worked on projects where we used both VB.net and C# and it was a very fine output in the end. So before you start rejecting VB.net users note this, a lot of them are new to programming and are using it as a way to jump, or they just feel that its the right language for them, its practically like speaking english so its easy to see why they'd pick it.

» Report offensive content

17

Chris - 23/07/09

VB.Net does not support pointers.
VB.Net uses type forwarding (major issue is you are doing financial calcs)
Microsoft.VisualBasic.dll <== WHY????

c# > VB.Net

» Report offensive content

18

Rex the Strange - 04/12/09

I totally agree with this post - in fact, I go beyond it (if you read my blog you can see my own comments on the C family syntax). Anyone who claims that C is easier to read, clearly can't read.

» Report offensive content

19

Mike - 18/12/09

My humble opinion - The problem with most programmers now-a-days is that they just follow the herd, and many are not experienced enough to think on their own. Most programmers get pleasure by writing code that looks like 'code' to average people. These programmers think that it makes them more mysterious if they use a lot of {} \n ; and other symbols (rather than english looking VB code), because it looks 'cooler'.

My first suggestion to these coders is - get a real life, have real social friends and the ones who are not coders like themselves and dont find 'pleasure' just by using symbols!

The real reason why C# programmers think they are better is simply because they are very insecure in real lives, they need to write code which looks cryptic so that they can feel they know something that others do not; and as such they are better.

Programming should be about what you can achieve (the value in business), in the shortest amount of time, and in the simplest manner possible. And if a non-programmer can read some of the code, it only shows that the 'code' written was 'smart' and superior.

C syntax was developed by couple of people in the late 60s; people who never left their labs and never had experienced real life. They even forgot to put the string data type in C, because they probably never wrote (letters, etc.) to anyone in real life. They were just loners with relationships only with binary code, the only place they felt they had any control.

There is nothing wrong with VB or other similar languages, they are just smarter and better. Writing in symbols by skipping words is not rocket science, The Egyptians were doing it 3000-5000 years ago - \n ; oop->kk {jjk ++i --a } \t {} {} {}

» Report offensive content

20

Eddie - 15/01/10

I have programmed in the following languages: Assembly, C/C++, Clipper, DBase III, Access, Pascal, Basic, Delphi, VB, VB.Net, C# (and probably some I forget now).

I never thought one language was better than the other. Sure some of them may had some flaws, but the major flaw is almost always the developer him-/herself by being too narrow minded to look at the positive sides of any programming language.

Just remember this: An excellent program is not developed by the language used, but by the person responsible of develivering the code.

So to state that C# is better than VB.Net (or vice versa) is basically admitting that you yourself are not an excellent developer!

» Report offensive content

21

Gary - 19/01/10

People seem to think that identical C# and VB.NET code produces identical MSIL opcode - that is, there are no differences in efficiency between the two.

If you delve into this a little bit, you find that there are differences. You begin to see that VB.NET really is a second class citizen due to the fact that the VB.NET compiler produces slightly less efficient MSIL than C#.

For example, take a method which declares a single parameter. The MSIL code generated by C# for the method declares one parameter, whereas the MSIL code generated by VB.NET declares two. This may seem small, but consider the number of methods in an application. That extra parameter equates to megabytes of extra data needing to go through your processor cache for no reason.

This is also true in the MSIL code generated by Try/Catch statements. Due to VB's legacy of "On Error Resume Next", every Try/Catch statement generated by VB.NET has an additional conditional statement to test for this in MSIL than do the C# try/catch statements.

Furthermore, C# has some language features which VB doesn't: anonymous delegates, the ability to use pointers (the "unsafe" keyword), and the "using" keyword. I'm sure there are others. Aside from pointers, these may be little more than syntactic sugar, but they show clearly that VB.NET is not the first rate language that is C#.

Lastly, VB.NET's default string comparison operator actually functions differently to C#'s due to the need for backwards compatability with VB. Null and Empty strings equate to true in VB.NET and false in C#. C#'s interpretation is the correct one, as any comparison to null should always yield false - even null to null. Not only are the comparisons different, VB.NET's string comparison is demonstrably less efficient as well. You can work around this by explicitly calling String.Equals instead of using =, but now we're back to cluttering our code with even more ugly and unnecessary syntax.

So, VB.NET produces less efficient MSIL code than C#. That's not merely a syntactical preference of the programmer. That is a real-world difference that has a real-world impact on application performance.

And while the choice of language is, as some posters rightly point out, not usually the most important consideration in a project, the fact is that both languages target the same problem domain. They directly compete. One is clearly more efficient then the other. There is no reason to choose the least efficient one.

Hence, C# > VB.NET.

» Report offensive content

22

ram# - 20/02/10

c# is best language for coding and easiet way to write the coding

» Report offensive content

Leave a comment

You must read and type the 6 chars within 0..9 and A..F

* indicates mandatory fields.

22

ram# - 20/02/10

c# is best language for coding and easiet way to write the coding ... more

21

Gary - 19/01/10

People seem to think that identical C# and VB.NET code produces identical MSIL opcode - that is, there are no differences ... more

20

Eddie - 15/01/10

I have programmed in the following languages: Assembly, C/C++, Clipper, DBase III, Access, Pascal, Basic, Delphi, VB, VB.Net, C# (and probably ... more

Log in


Sign up | Forgot your password?

  • Chris Duckett IE9's H.264 vote killed Ogg

    In a split decision by the judges, the winner of the W3C/WHATWG video codec consensus is H.264, taking home the future of video playback on the internet while loser Ogg goes home with nothing but thoughts of what might have been. Read more »

    -- posted by Chris Duckett

  • Staff Google launches Apps Marketplace

    Google launches and app store, while Mozilla plans to re-write its open-source license. More of this week's news in the Roundup. Read more »

    -- posted by Staff

  • Staff Microsoft showcases new NUIs

    TechFest, Microsoft's internal even took place this week with researchers showcasing some new interfaces the company is working on. Read more »

    -- posted by Staff

What's on?

  • Optus Deal

    Broadband + home phone + PlayStation®3 in a single package price!