The Not-So-Great Curly Brace-Dim Divide

I just read the Silent Majority post by Paul Vick, which challenges conventional wisdom by offering some evidence that VB.NET is more popular than C#. The VB.NET vs C# flame war that ensued in the comment section led me to the following thoughts.

1. The difference between these languages truly is trivial. The recruiters I talked to a few months ago when I was switching jobs from a VB.NET to a C# shop looked more than a little skeptical when I told them that I was just as qualified for a C# position as I was for a VB.NET position. It turns out I was right. It really only did take a few days before I felt as fluent in C# as I did in VB.NET. By scanning a Cheat Sheet and making occasional use of Reflector or a converter, you should literally be able to pick up the other language in a matter of hours. Ninety percent of programming these days has been abstracted to the base class libraries and there just aren’t that many keywords in a programming language to have to relearn.

2. Despite having spent most of my programming career in VB.NET, I now have a clear preference for C#. This is purely subjective, but I really value conciseness. Anything that gives me fewer words to type or scan with my eyes is preferable and it is just painful for me now to go back and see all those gratuitous Dim…As, End, and OverloadsThat being said, there are a few things I miss about VB.NET. The biggest one is actually a compiler rather than a language issue. I liked the immediate feedback from background compilation and haven’t quite figured out why the C# compiler never included it. I also find myself missing the syntactic sugar of The Handles keyword for declarative wiring of events to functions and the With keyword for using the same object repeatedly.

I definitely don’t miss either of these features enough to want to go back to VB.NET and they are pretty trivial when compared to a language feature like anonymous delegates, which C# has and VB.NET doesn’t, but I still liked them.

3. If you think the VB/C# debate is still important, then you are seriously out of touch. I find it hard to fathom how someone could possibly get excited about curly braces and dim statements when the rest of the world is busy discussing the inherent weaknesses of strongly typed OO languages when it comes to issues like concurrency and meta-programming.

For all you VB/C# holy warrior relics, may I suggest the following:

Instead of ardently trying to convert your fellow .NET developer to your side of this otherwise trivial language debate, why not join forces and start questioning whether the next versions of either language will be able to compete with dynamic languages like Ruby when it comes to productivity or functional languages like Erlang when it comes to effectively scaling out .NET applications in a multi-core future?

Just a thought.

6 Comments so far

  1. Martin Hinshelwood on November 28th, 2007

    The only reason that I find VB a better option for me is the compatability between VB.NET and dyslexia.

    Anyone that asks for help with dyslexia and programming I refer to VS and VB because of the compatability with some of the language features and assisting in the dyslexic brains processing during coding :)

    My post caused quite a flame though…a vernarable inferno :)

  2. Russell Ball on November 28th, 2007

    @Martin - I like the Word spell-checker analogy in your post to drive the point home about background compilation. I’ve heard people argue that they don’t like it, but that just baffles me.

    Impressive number of comments on that post too. I have yet to strike it big in the flame comment department yet and I’m jealous. Perhaps I’ll start collecting C# programmer insults… :-)

  3. Russell Ball on November 28th, 2007

    @Martin - I like the Word spell-checker analogy in your post to drive home the logic of background compilation. I’ve heard people try to argue they don’t like it, but it seems like a no-brainer to me.

    I also forgot to mention about case sensitivity. That is also a royal pain in the butt in C#. It especially sucks in that it limits the effectiveness of intellisense.

    Impressive number of comments on your post too. I have yet to strike it big in the flame comment department, so I’m jealous…:-)

  4. Jon H on November 28th, 2007

    C# has its equivalent of With.

    using Foo
    {
    bar = fubar;
    foobar = fubar;
    }

    same as:

    Foo.bar = fubar;
    Foo.foobar = fubar;

  5. Troy Tuttle on November 28th, 2007

    I agree, in the big picture, the differences between these languages are trivial. There are so many _real_ language issues to be discussed–this old horse of an issue is just tired and broken.

    A couple of thoughts on the tool side:
    Since I came from a C# background, the background compiler for VB.NET was a little annoying (I know that I’m only half way through this method, stop bugging me). I got used to hitting Ctrl+Shift B when writing C# to dictate to the IDE when I wanted feedback on my syntax.

    I find that Resharper gives me much better feedback in C# and VB.NET than the built-in VB.NET IDE features ever did.

  6. Russell Ball on November 28th, 2007

    @Jon - Thanks for the tip.

    @Troy - I agree that ReSharper strikes a pretty good compromise with when it comes to background compilation.

    As far as what’s annoying vs helpful, like everything else in this debate it’s pretty subjective. I guess I just got used to only paying attention to the squiggly lines when I expected there to be none, sort of like I do when typing word documents. That approach seems to interrupt my flow less than stopping to hit a few keystrokes and then waiting for compilation to complete because it is now happening synchronously instead of asynchronously .

Leave a reply


Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/rtball/domains/caffeinatedcoder.com/public_html/wp-includes/class-snoopy.php on line 1158

Warning: fsockopen() [function.fsockopen]: unable to connect to twitter.com:80 (Unknown error) in /home/rtball/domains/caffeinatedcoder.com/public_html/wp-includes/class-snoopy.php on line 1158