Why VB Is Better Than C# ...

... because I said so. But seriously, while looking something in the newsgroups, I came yet another VB v. C# debate. Better-Intellisense this, Operator Overloading that. I really don't get it. And it got me thinking ... when it comes down to it, it's like arguing what's better: Chocolate or Peanut Butter [*].

I recently starting using C# to develop things because apparently, all the employers around the Cleveland Area want C#. I really don't see a huge difference. Sure, it's static instead of Shared, out instead of ByRef (or something), things like that ... but it's nothing like the difference between ASP.NET and WindowsForms. That's where we should be arguing ...

But, I'm surprised how easy it was for me to pick up and become equally (almost) productive with C#. My advice ... when you can, just work with both. Develop a small project in your alter-language. All it can do is help.

[*] For the record, Peanut Butter is sooo much better than chocolate.

9 Comments

  • VB.Net needs multiline comments and multiline code support.



    Screw placing a ' before each line.



    Screw placing _ at the end of each line.



    It's the little things that matter.



    -rs-

  • I like to call all these silly tech arguments "artichokes and roses". As in, if normal people were like geeks, the internet would be full of endless arguments about whether artichokes are better than roses. It would have all the right qualities. They're both plants, right? So, one has to be better than the other. Then, somebody will say, "yeah, but roses are ornamental plants, while artichokes are food. So if you want to grow something to look at, you want have roses, but if you want to eat, you want artichokes." The inevitable responses would come from the folks who cook with roses and those who grow artichokes ornamentally (both true, by the way). Then the conversation would descend into whether thorns are good or bad, etc. etc. See how fascinating that discussion would be?

  • Arguing about stuff like you meantioned (syntatic stuff) is lame. There *are* a few actual feature differences.



    For instance, VB.Net can be used in a late-bound manner, which is sometimes very useful for asp.net development.



    It also has the Handles clause, also very handy for UI dev.



    C# has pointers and a clever syntax for adding event handlers.



    If you're going to argue about it (which really is silly given the similarities), at least argue about features.

  • Which is better, a Chevy or a Ford? Although the ride might be a little different, the bottom line is - they both get you where you're going! I've been using VB for a lot of years, but after working with C# a little here and a little there, I'm really starting to like it. Not because it can do anything more than VB, but simply because I'm enjoying the ride.



    Speaking of Ford, I really wish mine had a low fuel light. Likewise, I wish C# wasn't case-sensitive.

  • Why C# is Better....

    -'==' Assignment operator is not the same as the comparison operator

    -operator overloading

    -'--'

    -'++'

    -'@'

    -as operator (string s = obj as string)

    -'OnError GoTo' is impossible

    -EntryPoint isn't hidden ([STATThread] static void Main(string[] args))

    -'using' blocks

    -'params' keyword

    -less verbosity

    -much easier to read

    -intellisense is much less interfering

    -better and more optimized MSIL generation

    -unmanaged/unsafe code

    -casting (instead of ctype, cbool, etc)

    -XML comments

    -Multiline comments

    -event syntax

    -delegate syntax

    -pointers

    -'ByVal' is very misleading (it passes a pointer (ie reference), not a value; whereas 'ByRef' passes a pointer to a pointer)

    -does not hide "Advanced Members"

    -unsigned values (uint, ulong)

    -P/Invoke makes much more sense, and is uberly easier to figure out

    -'Default Namespace' doesn't just prefix your classes namespace

    -array/collection indexor is not the same as a function call ('[0]', vs '(0)')

    -more & better literature (especially advanced topics)

    -C# Developers make more money

    -hierarchical constructor calling (ctor() : ctor("defaultValue"))

    -option explicit by default (inforces correct type usage)

    -doesn't hide delegate usage (AddressOf)





    But Hey, I'm not predjudice against VB ;-)

    I use it all the time, and its got some good features too (cough):





    Why VB is Better....

    -With Blocks

    -Imports is more powerful than using

    -optional parameters

    -default parameters

    -Beep function

    -InputBox

    -ID 10 T support

    -There are more pretty colors

    -If you can't tell, I am running out of things to put here...

  • How does "-much easier to read" go into the c# category? Not even on a good day. I have been recently cursed and forced into doing some projects with C# when VB would of done the job just fine, easier to read, and done in half the time; if for no other reason then the advanced intelisence of the IDE in VB. I have absolutely nothing against C# except for the fact that it has been come vogue. And at this release that is all that it is. I am excited to see what vs2005 and future releases are going to further separate the languages. Anyone have to work in both C# and VB?

  • A feature that blocked me and is NOT in VB :
    Create a class with an event and serialize it....
    you'll see....

  • chuckbuc:
    Not everyone thinkg VB is easier to read than C#. I think quite the opposite. Reading VB for me give me a headache because I keep having to go back and forth on a line to get the information I need, and the order things are placed in is sometimes confusing. Add to this that C, C++, Java, and C# all share a very similar syntax, and you'll realize that most people should have a MUCH easier time reading C# than VB.

    I use both every day. I prefer C# because I'm used to that form of syntax, and can pump out code incredibly fast even without intellisense. In the end though, it's just a matter of preference.

  • It all comes down to how your first experience with your first language went. If you were first introduced to VB and you did well then you like that more. Thats what happened to me and I liked VB.NET. I am the opposite of what the guy before me says. Reading VB for me is easy and C# is more difficult. I feel like I am jumping all over the place in C#. I suppose you can get used to any language if you look at it enough.

Comments have been disabled for this content.