Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. VB/C# "Coevolution"

VB/C# "Coevolution"

Scheduled Pinned Locked Moved The Lounge
csharpc++visual-studiocomcollaboration
54 Posts 32 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • realJSOPR realJSOP

    There's a difference between being a VB programmer and liking it, and being a VB programmer because you have to be right now (me).

    .45 ACP - because shooting twice is just silly
    -----
    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
    -----
    "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

    C Offline
    C Offline
    Christopher Duncan
    wrote on last edited by
    #29

    Using the commonly accepted definition of the phrase, you are not now, nor will you ever be, a VB programmer. You're merely a programmer, and one who occasionally must resort to VB in order to continue eating on a regular basis. I used to dig ditches, work in factories and do other mindless and menial tasks in order to pay the bills. It's called survival skills. :)

    Christopher Duncan
    www.PracticalUSA.com
    Author of The Career Programmer and Unite the Tribes
    Copywriting Services

    1 Reply Last reply
    0
    • N Nemanja Trifunovic

      A nice summary of VS team's C# and VB strategy can be found here[^]. They recognize that the only difference between the two languages is a little bit of syntax, and that will be kept separate. Everything else (tools, runtime, etc) will be shared. Or, in one line of code: C# = VB + "{};"

      utf8-cpp

      E Offline
      E Offline
      etkid84
      wrote on last edited by
      #30

      it was my understanding that vb, c#, and even their failure j# would all share the same virtual machine allowing applications to communicate seamlessly through the virtual machine. has anyone seen this actually done in industry?

      David

      1 Reply Last reply
      0
      • W William Winner

        Maybe I haven't set up VS to make C# programming quicker, but I find the IDE in VB so much easier to use. For instance, the fact that you don't have to know which methods are available for a control, you just pick the one you want from the drop down's at the top of the code window. Or the fact that the VB IDE seems to correct a lot, which can make it a lot quicker...like if I type "if i = 0" and hit enter, it fills in the "Then" and "End If". And some of the statements seem more streamlined or with more functionality...for instance

        Select Case intI
        case <5
        do something
        case 6-10
        do something else
        case >10
        do another thing
        End Select

        or instead of for (int i = 1; i <= 5; i++) how about for i = 1 to 5. Personally, I find the VB IDE soooo much easier and quicker to use.

        A Offline
        A Offline
        Alan Burkhart
        wrote on last edited by
        #31

        "...Personally, I find the VB IDE soooo much easier and quicker to use."
        My thoughts exactly. VB has its drawbacks like any language. But all the curly braces and semicolons in C# add to the clutter on the screen. VB's syntax is nice and clean.

        E 1 Reply Last reply
        0
        • N Nemanja Trifunovic

          A nice summary of VS team's C# and VB strategy can be found here[^]. They recognize that the only difference between the two languages is a little bit of syntax, and that will be kept separate. Everything else (tools, runtime, etc) will be shared. Or, in one line of code: C# = VB + "{};"

          utf8-cpp

          C Offline
          C Offline
          CygnusBMT
          wrote on last edited by
          #32

          That's all well and good and people can debate about which code is easier to read. What's really important, though, is how easy a language is to look at code written for it and understand all of what it's doing. Unfortunately, the best language for that in the .Net world, C++/CLI, gets almost no support.

          1 Reply Last reply
          0
          • D Duncan Edwards Jones

            Nonsense - txt spk is > sccnt ! ez As a general rule the total mental processing in any communication is constant therefore the more effort made by the writer the less is required by the reader and vice versa. The design goal of "easy to write" should only be prioritised if more people are going to write the code than are going to read it.

            '--8<------------------------ Ex Datis: Duncan Jones Free eBook: Printing - a .NET Developer's Guide (Part 1)

            S Offline
            S Offline
            Sterling Camden independent consultant
            wrote on last edited by
            #33

            You'd be right, except that it turns out in practice that succinctness often contributes to clarity. Exception taken for use of obscure tricks.

            Contains coding, but not narcotic.

            1 Reply Last reply
            0
            • D DABBee

              VB code is easy to read - what drugs are you on. Can I have some ?

              Candy: Here's the plan: we changes our names, move to a distant island, and disguise ourselves as a family of traveling donkey polishers.

              R Offline
              R Offline
              ronmoles
              wrote on last edited by
              #34

              VB code is THE ugliest code I've ever seen. I'm a .net developer, and am looking at a peachy job, only 8 miles from my house (I currently commute over 45 miles ONE WAY to work). I'm second guessing taking that job because... they code in VB. While I realize that vb.net is every bit effective as C#, it takes me back to the mid 90's, where VB6 (and earlier incarnations) was what people who WEREN'T real programmers used. It makes my stomach turn to even look at VB syntax. Do a search on CareerBuilder (or monster, or whatever) for the city where you live for ".NET DEVELOPER". Then see how many refer to VB. I did this for Charlotte, and got 51 hits (25 per page). On the first page, 22 were C#, one said vb/c#, one said vb, the other didn't specify. That's not even 10% usage. I didn't even bother to look at the second page. Businesses are primarily settling on C#. Probably because "real" programmers don't wanna look at that VB crap. That's not ME talking... that's the facts of the business world. Do your own search and see it for yourself.

              M J T 3 Replies Last reply
              0
              • N Nemanja Trifunovic

                A nice summary of VS team's C# and VB strategy can be found here[^]. They recognize that the only difference between the two languages is a little bit of syntax, and that will be kept separate. Everything else (tools, runtime, etc) will be shared. Or, in one line of code: C# = VB + "{};"

                utf8-cpp

                S Offline
                S Offline
                Simon_Whale
                wrote on last edited by
                #35

                Using VB / C# is down to a personal preference for one reason or another. But at the moment i am getting more consistant work with VB where i live

                1 Reply Last reply
                0
                • A AspDotNetDev

                  Rather than "End Select", "End Sub", "End While", and so on, C# has "}". More concise. You are ending a code block, so you really only need one thing to do that, and why not make it one character, so you don't need anything to be filled in when you press ENTER. In C# Windows Forms development, you just right click a control (in the designer) and select "Properties". You then click the little lightning icon if you want to see all the events on the control you can subscribe to. Same as the "which methods are available for a control" you mention in VB. Or you can use intellisense by typing the control name and typing "."... a list will pop up with all the methods, properties, and events on that control. There are even little icons to identify what type of thing (event, method, property, etc) each thing is. No real difference here between VB/C# in the IDE. C# has the "switch" statement, which is much like the "select case" statement in VB. One thing I do like in VB is the ability to do ranges and such (e.g., "case < 5"), which you cannot do in C#. The only way to do that in C# is to do a chained "IF" statement, but that's not too ugly given how concise the syntax is in C#. For example:

                  if (intI < 5)
                  {
                  // Do something.
                  }
                  else if (intI >=6 && intI <=10)
                  {
                  // Do something else.
                  }
                  else if (intI > 10)
                  {
                  // Do another thing.
                  }

                  I'm sure the builders of C# could add an extra construct to parse a "for(i = 1 to 5)" or something of that sort, but I don't see any reason to clutter up the language with specific cases. The included "for" statement is more flexible than the VB version. There is also "foreach" which I think is in both languages. I like that C# doesn't add unnecessary syntactic sugar unnecessarily to burden me with learning extra stuff. Some people like that kind of thing though, so I suppose VB works fine for them. I'd say the main difference between VB and C# is that C# seems more geared to those who want to understand the underlying concept (e.g., a code block is the same no matter which context it is in) while VB is more geared toward concrete thinkers who want to see things in more explicit terms (e.g., there is a "SELECT" code block and a "WHILE" code block and a "FOR" code block and so on).

                  [Forum Guidelines]

                  E Offline
                  E Offline
                  ecooke
                  wrote on last edited by
                  #36

                  That is one thing I miss about VB. I always prefered the End If/While/Function/Sub stuff instead of }. Makes it easier to see, yes, this code was an if statement, this was a while loop, etc. At least VS highlights the opening brace though. But that being said, I prefer c#, case sensitivity is actually nice when knowing where a variable was defined if you always follow a programming standard, variables starting with _ are global, lower case are defined in the method, and capitals are always the name of the method. At least, thats the way we do it here.

                  I like dead people. They are quiet and happy with what you give them.

                  K 1 Reply Last reply
                  0
                  • A Alan Burkhart

                    "...Personally, I find the VB IDE soooo much easier and quicker to use."
                    My thoughts exactly. VB has its drawbacks like any language. But all the curly braces and semicolons in C# add to the clutter on the screen. VB's syntax is nice and clean.

                    E Offline
                    E Offline
                    ecooke
                    wrote on last edited by
                    #37

                    Have you tried coding in C# for a few years, then having to go back to vb...VB hates semi colons, and it's a habit now...hahaha.

                    I like dead people. They are quiet and happy with what you give them.

                    1 Reply Last reply
                    0
                    • R ronmoles

                      VB code is THE ugliest code I've ever seen. I'm a .net developer, and am looking at a peachy job, only 8 miles from my house (I currently commute over 45 miles ONE WAY to work). I'm second guessing taking that job because... they code in VB. While I realize that vb.net is every bit effective as C#, it takes me back to the mid 90's, where VB6 (and earlier incarnations) was what people who WEREN'T real programmers used. It makes my stomach turn to even look at VB syntax. Do a search on CareerBuilder (or monster, or whatever) for the city where you live for ".NET DEVELOPER". Then see how many refer to VB. I did this for Charlotte, and got 51 hits (25 per page). On the first page, 22 were C#, one said vb/c#, one said vb, the other didn't specify. That's not even 10% usage. I didn't even bother to look at the second page. Businesses are primarily settling on C#. Probably because "real" programmers don't wanna look at that VB crap. That's not ME talking... that's the facts of the business world. Do your own search and see it for yourself.

                      M Offline
                      M Offline
                      Middle Manager
                      wrote on last edited by
                      #38

                      That's probably because people with a similar beligerant attitude to yours got to the senior dev positions first and ensured that VB stayed away from their realms -- likely because of just the same VB6 (and ealier) recollections. [A powerful and effective] VB.NET has only been around a very short time so it has an uphill climb to claw its way into the IT hallowed halls. What the OP article reminds us of is that the scales have been evened now in terms of technical capacities. I think a strongly partisan attitude like yours is what keeps VB in the shadows as an ugly little step brother to C#. VB gets the job done just the same when it boils down to IL (with a few exceptions) and someone adept at writing in it can be as fast if not faster at getting the equivalent work finished by deadline in C#... and they can read/comprehend it just as fast. Is this not what is really needed of a language in the average professional environment?

                      R 1 Reply Last reply
                      0
                      • M Middle Manager

                        That's probably because people with a similar beligerant attitude to yours got to the senior dev positions first and ensured that VB stayed away from their realms -- likely because of just the same VB6 (and ealier) recollections. [A powerful and effective] VB.NET has only been around a very short time so it has an uphill climb to claw its way into the IT hallowed halls. What the OP article reminds us of is that the scales have been evened now in terms of technical capacities. I think a strongly partisan attitude like yours is what keeps VB in the shadows as an ugly little step brother to C#. VB gets the job done just the same when it boils down to IL (with a few exceptions) and someone adept at writing in it can be as fast if not faster at getting the equivalent work finished by deadline in C#... and they can read/comprehend it just as fast. Is this not what is really needed of a language in the average professional environment?

                        R Offline
                        R Offline
                        ronmoles
                        wrote on last edited by
                        #39

                        Per my original post, I confessed that vb.net is 100% "equal" to C#. Professionally trained programmers (via university and such) will learn C-based languages. Either C, or C++, possibly even C#. They most likely won't even see ANY version of Basic in school (VB or otherwise). I could be slightly wrong in this regard, as it's been 20+ years that I went to school. If students ARE using VB in college... that's a new thing, as even recently as the early 2000's, students were coming out with C++ knowledge. Am I biased against all things VB (whether it's VB6 or VB.NET)? You betcha. Even in my current job, I had to do recode part of a "legacy" program that was done in VB.NET. (I say legacy as it was done 4 years ago, when we allowed a contractor to use VB.NET). It irritated me no end how much "control" VS tried to enforce on me. Hey, I love intellisense and other template features it provided, but with some formatting it *forced* its view on my code. Yet the C# environment would never do that. End of story.... businesses today use C#, not VB. I'm fine with it staying that way.

                        M 1 Reply Last reply
                        0
                        • R ronmoles

                          Per my original post, I confessed that vb.net is 100% "equal" to C#. Professionally trained programmers (via university and such) will learn C-based languages. Either C, or C++, possibly even C#. They most likely won't even see ANY version of Basic in school (VB or otherwise). I could be slightly wrong in this regard, as it's been 20+ years that I went to school. If students ARE using VB in college... that's a new thing, as even recently as the early 2000's, students were coming out with C++ knowledge. Am I biased against all things VB (whether it's VB6 or VB.NET)? You betcha. Even in my current job, I had to do recode part of a "legacy" program that was done in VB.NET. (I say legacy as it was done 4 years ago, when we allowed a contractor to use VB.NET). It irritated me no end how much "control" VS tried to enforce on me. Hey, I love intellisense and other template features it provided, but with some formatting it *forced* its view on my code. Yet the C# environment would never do that. End of story.... businesses today use C#, not VB. I'm fine with it staying that way.

                          M Offline
                          M Offline
                          Middle Manager
                          wrote on last edited by
                          #40

                          I think you've touched upon a more valid point -- that the level of general programming training in the C# camp is still probably disproportionally higher. VB is still very much a wide open gate (with neon sign perhaps ) for the average duffer with a ken for "doing fun stuff on the computer". Learning stuff the hard way is no subtitute for learning it the right way first. I'd make that my tag line but I learned a lot the hard way and seeing that written all the time would probably make me sad. :)

                          1 Reply Last reply
                          0
                          • N Nemanja Trifunovic

                            A nice summary of VS team's C# and VB strategy can be found here[^]. They recognize that the only difference between the two languages is a little bit of syntax, and that will be kept separate. Everything else (tools, runtime, etc) will be shared. Or, in one line of code: C# = VB + "{};"

                            utf8-cpp

                            M Offline
                            M Offline
                            Matt McGuire
                            wrote on last edited by
                            #41

                            this is a good thing, because underneath is all it still compiles down to IL, and will keep all developers on an even playing field. This of course will torque C# devs, because of some weird holier-than-thou attitude. the fact that at my business we use VB.net is actually a benefit for getting semi technical people to understand what’s going on in the code or even get someone new up and going. this is not to say that VB is a dumbed down language, it's just more natural English (i know sucks for other places) then bunches of {}; I will admit that a lot of VB6 devs had horrible code because they were allowed to; and then carried that on to .NET. It's no excuse not to constantly improve your way of coding. With that said: I can understand some animosity toward these type of developers who had it too easy in the past, but .NET should of changed this. I feel the reason the job listings tend to list C# more then VB.NET has all to do with naming: if C# would not have been named as a C predecessor or VB would have been renamed to something else, there would not have been this funny old way of thinking that C#=C and VB = gwBasic so lets only look for C# devs. Any dev worth his salt can work with other languages. I've prefer VB.net syntax, but I can work in C#,C,C++, but I don't like to, I find the syntax crude, and since I don't specialize in it, I'm sure to someone who does: it would look messy. the same is true for some of the C# codes I've seen working in VB, as it looks like crap to me because they are not completely as ease with the language. one last complaint: VB6 coders still out there = Grow up! you should have started moving on 10 years ago. I dumped VB6 like a flaming bag of dog s*** that it was as soon as I could. there should have at least been side by side dev to replace VB6 apps a long time ago! so how many people did i piss off?:cool:

                            1 Reply Last reply
                            0
                            • D Duncan Edwards Jones

                              Surely you mean C# == VB - (VB.UglySyntax | VB.CounterIntuitiveUseOfTheSameBracesEveryWhere | VB.OverlyVerboseAndHardToReadCode );

                              '--8<------------------------ Ex Datis: Duncan Jones Free eBook: Printing - a .NET Developer's Guide (Part 1)

                              F Offline
                              F Offline
                              Fabio Franco
                              wrote on last edited by
                              #42

                              It easier to read whatever language you are used to. Hell, I used to code in VB5 and could never understand C++ code. Now I can't understand most VB code, really hard to read. So I'd say: C# == VB - (VB.UglySyntax | VB.CounterIntuitiveUseOfTheSameBracesEveryWhere | VB.OverlyVerboseAndHardToReadCodeForCDevs );

                              1 Reply Last reply
                              0
                              • P PIEBALDconsult

                                But what about writing it in a text editor? Don't judge a language by a single IDE.

                                M Offline
                                M Offline
                                Member 4724084
                                wrote on last edited by
                                #43

                                PIEBALDconsult wrote:

                                But what about writing it in a text editor? Don't judge a language by a single IDE.

                                You've obviously never opened a VB .frm file in a text editor, you can do exactly the same thing, the only difference is you have to define what kind of form, what controls and where they are. Other than that it's straight normal coding. And before anyone flames me for being a "VB lover" keep in mind that I learnt BOTH VB6 AND C++. But I still prefer to use VB6, I find it easier to manage code in since the classes and forms are entirely seperate from each other and can be done as 2 seperate projects if wanted... The same can't be said for .NET, at least not from what i've seen. I find the whole .NET architecture to be slow and clunky. It's a well known rule that the further you get away from machine code, the slower and clunkier the IDE, compiler and program is. VS.NET is further away from machine code than what VS6 is. That being said, VB of any flavour is still entirely unsuited for certain tasks, because C++ is faster. With that second point being made, C++ can do some things that VB just can't do... like forcing the program to be run in a specific memory block, or defining how much memory a program can use.

                                1 Reply Last reply
                                0
                                • N Nemanja Trifunovic

                                  A nice summary of VS team's C# and VB strategy can be found here[^]. They recognize that the only difference between the two languages is a little bit of syntax, and that will be kept separate. Everything else (tools, runtime, etc) will be shared. Or, in one line of code: C# = VB + "{};"

                                  utf8-cpp

                                  K Offline
                                  K Offline
                                  Kevin McFarlane
                                  wrote on last edited by
                                  #44

                                  Hmmm, not looked at the other replies yet but I bet they contain a fair sprinkling of anti-VB rants! :)

                                  Kevin

                                  1 Reply Last reply
                                  0
                                  • W William Winner

                                    Maybe I haven't set up VS to make C# programming quicker, but I find the IDE in VB so much easier to use. For instance, the fact that you don't have to know which methods are available for a control, you just pick the one you want from the drop down's at the top of the code window. Or the fact that the VB IDE seems to correct a lot, which can make it a lot quicker...like if I type "if i = 0" and hit enter, it fills in the "Then" and "End If". And some of the statements seem more streamlined or with more functionality...for instance

                                    Select Case intI
                                    case <5
                                    do something
                                    case 6-10
                                    do something else
                                    case >10
                                    do another thing
                                    End Select

                                    or instead of for (int i = 1; i <= 5; i++) how about for i = 1 to 5. Personally, I find the VB IDE soooo much easier and quicker to use.

                                    K Offline
                                    K Offline
                                    Kevin McFarlane
                                    wrote on last edited by
                                    #45

                                    William Winner wrote:

                                    I find the IDE in VB so much easier to use

                                    I've programmed a lot in both C# and VB .NET (and classic VB). I find the IDE support in C# way better than VB. In fact I find VB more irritating in this respect than any differences in the language. Some things just don't work properly at all, e.g., expand/collapse regions. Code snippets implementation is anal. IntelliSense implementation is clumsy. There are other negatives that I can't recall right now.

                                    William Winner wrote:

                                    if I type "if i = 0" and hit enter, it fills in the "Then" and "End If"

                                    I agree, that's helpful in VB. In C# you can press tab twice to expand the "if" code snippet, type i == 0, then hit enter to move to the body. OK, so one more step than VB but nothing worth worrying about.

                                    Kevin

                                    1 Reply Last reply
                                    0
                                    • W William Winner

                                      I don't use C# a whole lot, and I hadn't found that little lightning bolt yet. Yeah, that would have helped a lot. I do like that the brackets identify a code block, but the VS IDE automatically handles the tabbing for both languages (though, every once in a while, they don't), and without that, both languages can be hard to determine which '}' goes with which '{'.

                                      K Offline
                                      K Offline
                                      Kevin McFarlane
                                      wrote on last edited by
                                      #46

                                      William Winner wrote:

                                      both languages can be hard to determine which '}' goes with which '{'.

                                      And in both languages good coding practice should shun deeply nested code. Unfortunately we frequently have to maintain it. :(

                                      Kevin

                                      1 Reply Last reply
                                      0
                                      • E ecooke

                                        That is one thing I miss about VB. I always prefered the End If/While/Function/Sub stuff instead of }. Makes it easier to see, yes, this code was an if statement, this was a while loop, etc. At least VS highlights the opening brace though. But that being said, I prefer c#, case sensitivity is actually nice when knowing where a variable was defined if you always follow a programming standard, variables starting with _ are global, lower case are defined in the method, and capitals are always the name of the method. At least, thats the way we do it here.

                                        I like dead people. They are quiet and happy with what you give them.

                                        K Offline
                                        K Offline
                                        Kevin McFarlane
                                        wrote on last edited by
                                        #47

                                        ecooke wrote:

                                        Makes it easier to see, yes, this code was an if statement, this was a while loop, etc

                                        I actually use a CodeRush plugin to help me out. Amazingly useful, especially when I'm cutting and pasting code. See screenshot http://picasaweb.google.co.uk/lh/photo/esOenTrjP3l21VuPdYdRSw?feat=directlink[^] See the faint text at the end of the foreach and the end of the method. That text is just an overlay. It's not part of the file.

                                        Kevin

                                        1 Reply Last reply
                                        0
                                        • R ronmoles

                                          VB code is THE ugliest code I've ever seen. I'm a .net developer, and am looking at a peachy job, only 8 miles from my house (I currently commute over 45 miles ONE WAY to work). I'm second guessing taking that job because... they code in VB. While I realize that vb.net is every bit effective as C#, it takes me back to the mid 90's, where VB6 (and earlier incarnations) was what people who WEREN'T real programmers used. It makes my stomach turn to even look at VB syntax. Do a search on CareerBuilder (or monster, or whatever) for the city where you live for ".NET DEVELOPER". Then see how many refer to VB. I did this for Charlotte, and got 51 hits (25 per page). On the first page, 22 were C#, one said vb/c#, one said vb, the other didn't specify. That's not even 10% usage. I didn't even bother to look at the second page. Businesses are primarily settling on C#. Probably because "real" programmers don't wanna look at that VB crap. That's not ME talking... that's the facts of the business world. Do your own search and see it for yourself.

                                          J Offline
                                          J Offline
                                          James Lonero
                                          wrote on last edited by
                                          #48

                                          IF you want to see ugly code, look at Forth or APL. Basic is much easier to understand.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups