Lazycoder

17Mar/056

What gets me when I’m switching from VB.NET top C#?

Visual Basic .NET <--> C#

For me it's all the simple stuff. I don't know how many times I've typed in string _name; in a VB.NET class and gotten an error.

What really gets me though is all the damn TYPING I have to do when I'm just trying to inherit from a class or implement an interface and define out it's methods. Thank god the IDE will fill in the interface methods for me. Even when it does, there's no consistancy. I hit tab in C# but in VB.NET I have to hit enter. Then I have to go delete the linebreak that hitting enter puts in. That's annoying.

All of the shadows, implements, inherits, notinheritable, blah, blah, blah, etc... crap really keeps me from enjoying programming in VB.NET. Too much typing.

Filed under: C#, VB.NET Leave a comment
  • Brian

    I can’t stand the damn terseness of C#. Which } ends my for block and which ends my If block? Which is the end of my namespace and which is the end of my class? If the IDE would actually indent this stuff correctly, I might not mind (as much) but as it is, I save two hundred keystrokes a day and lose a half hour trying to figure out where I am.

    What does C# have against words? “Inherits” is clear what it means. “End If” is clear what it does. “:” is punctuation. “}” is an emoticon meaning “handlebar moustache.”

    Why are we straining to save every byte when a 80 gig drive costs about an hour’s work for most consultants? We waste hours of work for the sake of scores of keystrokes. That is insane! Terseness is a relic from the dark ages of computing.

    Don’t even get me started on case sensitivity. What, is there some desperate shortage of compiler errors?
    Are we so devoid of things to think about that it is vital we make our programmers remember that Exception is capitalized in C#?

  • Scott

    I’m with you on the confusing mess of brackets that C-based languages leave us in. But you can tell Visual Studio to highlight the start and end brackets when you type one in. That helps to tell where you are in the loop. I’d rather have it change the background color slightly when I’m inside some brackets and typing. The refactoring functionality in IntelliJ is better about showing you how your brackets line up. I think either Code Rush or ReSharper do something similar.

    The reason that terseness in a programming language is a good thing, IMO, is that less typing means fewering typing mistakes. Sure the VB IDE will compile it in the background and let you know if something isn’t kosher, but you still have to backtrack and find the error. All those keywords means more to process and fewer words you can use in your program.

    Case sensitivity sucks.

  • Brian

    Backround colors would indeed make all the {}’s easier to understand, but it doesn’t get around the basic problem that all structural elements in C-ish languages look exactly alike.

    It strikes me as the same as removing the label from both the toothpaste and the hermoid cream. It might be possible to tell them apart based on location, (medicine cabinet vs. top of the vanity) but it really isn’t a good idea.

    As far as the keywords using up available variable names, using For or Then or Inherits for variable names is *literally* right out of “How to Write Unmaintainable Code” http://www.freevbcode.com/ShowCode.Asp?ID=2547.

  • Scott

    That’s because they are keywords.

  • http://www.webdesigner-essen.de webdesigner essen

    Hi, i just thought i’d post and let you know your blogs layout is really messed up on the K-Melonbrowser. Anyhow keep up the good work.

  • http://schmidtmarcel.de/ Marcel

    Old Stuff :)