Is VB Caca??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Scott M.

    #16
    Re: Is VB Caca??

    But it is.

    No, it's not. In VB.NET, as soon as you move your cursor off the current
    line, the dynamic compilation feature of the language/VS.NET will check the
    code on that line for syntax and compile errors and you will get the
    infamous "blue wavy underline" right away.

    In C#, you must build your code to get the same syntax checking. C# is not
    dynamically compiled like VB.NET is.

    It's too bad, because it's really the main reason I haven't move to more
    development in C# yet.


    Comment

    • Tony K

      #17
      Re: Is VB Caca??

      Wow!!

      "Tom Leylan" <tleylan@nospam .netwrote in message
      news:uGP8q4OaHH A.808@TK2MSFTNG P04.phx.gbl...
      "RobinS" <RobinS@NoSpam. yah.nonewrote..
      >Why do you hang out here if you don't like VB?
      >
      Hi Robin: I realize your question was directed to Göran but I thought I'd
      take a stab at it since you seem like a reasonable person.
      Notwithstanding your attempts in microsoft.publi c.dotnet.genera l to get
      people to stop posting questions about why their modem won't dial and such
      :-)
      >
      Let me start with an example. Somebody asks "what do you think of Los
      Angeles" and someone replies "the smog is pretty bad". The reply to that
      guy shouldn't be "if you hate it so much why do you live in the United
      States?" Why? Because LA is in fact smoggy. There are valid reasons for
      living there anyway but that doesn't change the fact that it has a smog
      problem.
      >
      VB syntax is quirky in a number of ways due to it's roots. They may not
      seem quirky to a person who has only developed in VB but they are if you
      step back and compare it to other languages in an unbiased manner. That
      isn't easy, people have preferences and they tend to be passionate about
      them. So (again as an example) no matter how stupid the design of .MEM
      files was in dBASE II and dBASE III, people who used them called everybody
      who pointed that out "a mindless idiot." Is the Python language's indent
      sensitivity a good thing or a bad thing?
      >
      You've no doubt read a few of the threads here where the topic is LEN() or
      UCASE(). If a person (let's say me) suggests the syntax is dated (and
      goes out on a limb and suggests it was only retained to placate the VB6
      folk) that doesn't translate into "VB.Net is stupid". It could even be
      interpreted as "you'd get more respect (if C# is considered as a language
      that gets more respect) if the things that made it seem like a "toy
      language" (those aren't my words) were eliminated."
      >
      Everything in life doesn't have to come down to a language war. One can
      like Java fundamentally yet program in VB.Net for economic reasons and
      should be able to point out "that's odd" without being asked to leave a
      public newsgroup. The alternative to rational discussion is embodied in
      "the cult of VB6 developer" where everybody must chant the same thing or
      be branded a heretic. People have attempted to pull that nonsense here
      but I believe the days of yelling "he's a witch" and having that work have
      (thankfully) passed.
      >
      If I talk to a SmallTalk developer (and I have) and they proclaim there is
      no better language on the face of the planet I tend to doubt them.
      Perhaps there isn't for the type of software they write but by definition
      this can't be the universal case. If there was no language betterin every
      case there would be no other languages.
      >
      Tom
      >

      Comment

      • Tom Shelton

        #18
        Re: Is VB Caca??

        On Mar 17, 9:35 pm, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
        wrote:
        Goran
        >
        beside what Herfried wrote
        >
        A a very simple one, however is in my idea good maintanable
        \\\
        Dim x As Integer
        While x < 10
        x += 1
        End While
        ///
        >
        \\\
        int x;
        while (x < 10)
        {
        x += 1;}
        >
        ///
        As sample does not go,while it is very handy.
        >
        (Or maybe is there a setting I don't know)
        >
        Cor
        Your C# code would not compile. You would get a use of uninitialized
        local variable error :) In C#, it is required that you initialize a
        local variable before it's first use (C# only guarentees default
        initialization for class level variables). The above would be best
        expressed in C#:

        int x = 0;
        while (x < 10)
        {
        x++;
        }

        of course, you could do away with the {} in this case, and even do it
        on one line:

        while (x < 10) x++;

        --
        Tom Shelton


        Comment

        • Cor Ligthert [MVP]

          #19
          Re: Is VB Caca??

          Tom,

          It does not compare, I checked it although I know it would not, but as you
          know you never use it in C#.

          My point is that I like the way it is done in VB.Net and in my eyes. VB.Net
          is the start of a new generation of programming languages. While C# is the
          end of the C generartion. As forever people need time to get use to it, but
          I have the believe that it will be like that as soon as the shorter develop
          time becomes also vissible at management level. (And again I don't see it as
          a successor from VB6, it adopted only some good things from that although it
          took much more from C++)

          The code I made for C# which is exactly the same in VB.Net, will not compile
          in C#, while I don't understand why and can only see legancy
          impossibilities .

          We will probably see a lot of message which will show that the C# method is
          better, but the same kind of message I have already read a while ago about
          the puchcard which was better than the hard disk because it was by instance
          better transportable.

          :-)

          Cor

          "Tom Shelton" <tom_shelton@co mcast.netschree f in bericht
          news:1174200768 .614048.247430@ b75g2000hsg.goo glegroups.com.. .
          On Mar 17, 9:35 pm, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
          wrote:
          >Goran
          >>
          >beside what Herfried wrote
          >>
          >A a very simple one, however is in my idea good maintanable
          >\\\
          > Dim x As Integer
          > While x < 10
          > x += 1
          > End While
          >///
          >>
          >\\\
          >int x;
          >while (x < 10)
          >{
          > x += 1;}
          >>
          >///
          >As sample does not go,while it is very handy.
          >>
          >(Or maybe is there a setting I don't know)
          >>
          >Cor
          >
          Your C# code would not compile. You would get a use of uninitialized
          local variable error :) In C#, it is required that you initialize a
          local variable before it's first use (C# only guarentees default
          initialization for class level variables). The above would be best
          expressed in C#:
          >
          int x = 0;
          while (x < 10)
          {
          x++;
          }
          >
          of course, you could do away with the {} in this case, and even do it
          on one line:
          >
          while (x < 10) x++;
          >
          --
          Tom Shelton
          >
          >

          Comment

          • Cor Ligthert [MVP]

            #20
            Re: Is VB Caca??

            compare has to be compile

            Tom,
            >
            It does not compare, I checked it although I know it would not, but as you
            know you never use it in C#.
            >
            My point is that I like the way it is done in VB.Net and in my eyes.
            VB.Net is the start of a new generation of programming languages. While C#
            is the end of the C generartion. As forever people need time to get use to
            it, but I have the believe that it will be like that as soon as the
            shorter develop time becomes also vissible at management level. (And again
            I don't see it as a successor from VB6, it adopted only some good things
            from that although it took much more from C++)
            >
            The code I made for C# which is exactly the same in VB.Net, will not
            compile in C#, while I don't understand why and can only see legancy
            impossibilities .
            >
            We will probably see a lot of message which will show that the C# method
            is better, but the same kind of message I have already read a while ago
            about the puchcard which was better than the hard disk because it was by
            instance better transportable.
            >
            :-)
            >
            Cor
            >
            "Tom Shelton" <tom_shelton@co mcast.netschree f in bericht
            news:1174200768 .614048.247430@ b75g2000hsg.goo glegroups.com.. .
            >On Mar 17, 9:35 pm, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
            >wrote:
            >>Goran
            >>>
            >>beside what Herfried wrote
            >>>
            >>A a very simple one, however is in my idea good maintanable
            >>\\\
            >> Dim x As Integer
            >> While x < 10
            >> x += 1
            >> End While
            >>///
            >>>
            >>\\\
            >>int x;
            >>while (x < 10)
            >>{
            >> x += 1;}
            >>>
            >>///
            >>As sample does not go,while it is very handy.
            >>>
            >>(Or maybe is there a setting I don't know)
            >>>
            >>Cor
            >>
            >Your C# code would not compile. You would get a use of uninitialized
            >local variable error :) In C#, it is required that you initialize a
            >local variable before it's first use (C# only guarentees default
            >initializati on for class level variables). The above would be best
            >expressed in C#:
            >>
            >int x = 0;
            >while (x < 10)
            >{
            > x++;
            >}
            >>
            >of course, you could do away with the {} in this case, and even do it
            >on one line:
            >>
            >while (x < 10) x++;
            >>
            >--
            >Tom Shelton
            >>
            >>
            >
            >

            Comment

            • Herfried K. Wagner [MVP]

              #21
              Re: Is VB Caca??

              "Cor Ligthert [MVP]" <notmyfirstname @planet.nlschri eb:
              It does not compare, I checked it although I know it would not, but as you
              know you never use it in C#.
              >
              My point is that I like the way it is done in VB.Net and in my eyes.
              VB.Net is the start of a new generation of programming languages. While C#
              is the end of the C generartion. As forever people need time to get use to
              it, but I have the believe that it will be like that as soon as the
              shorter develop time becomes also vissible at management level. (And again
              I don't see it as a successor from VB6, it adopted only some good things
              from that although it took much more from C++)
              >
              The code I made for C# which is exactly the same in VB.Net, will not
              compile in C#, while I don't understand why and can only see legancy
              impossibilities .
              What exactly won't compile? As Tom said, C# doesn't (IMO unfortunately)
              automatically initialize variables of value types.

              --
              M S Herfried K. Wagner
              M V P <URL:http://dotnet.mvps.org/>
              V B <URL:http://classicvb.org/petition/>

              Comment

              • Cor Ligthert [MVP]

                #22
                Re: Is VB Caca??

                Herfried,

                I would be glad if it would compile in C#, I am not doing only VB.Net you
                know.

                Cor

                "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.atschr eef in bericht
                news:e%231an3Va HHA.1400@TK2MSF TNGP06.phx.gbl. ..
                "Cor Ligthert [MVP]" <notmyfirstname @planet.nlschri eb:
                >It does not compare, I checked it although I know it would not, but as
                >you know you never use it in C#.
                >>
                >My point is that I like the way it is done in VB.Net and in my eyes.
                >VB.Net is the start of a new generation of programming languages. While
                >C# is the end of the C generartion. As forever people need time to get
                >use to it, but I have the believe that it will be like that as soon as
                >the shorter develop time becomes also vissible at management level. (And
                >again I don't see it as a successor from VB6, it adopted only some good
                >things from that although it took much more from C++)
                >>
                >The code I made for C# which is exactly the same in VB.Net, will not
                >compile in C#, while I don't understand why and can only see legancy
                >impossibilitie s.
                >
                What exactly won't compile? As Tom said, C# doesn't (IMO unfortunately)
                automatically initialize variables of value types.
                >
                --
                M S Herfried K. Wagner
                M V P <URL:http://dotnet.mvps.org/>
                V B <URL:http://classicvb.org/petition/>

                Comment

                • =?ISO-8859-1?Q?G=F6ran_Andersson?=

                  #23
                  Re: Is VB Caca??

                  Herfried K. Wagner [MVP] wrote:
                  "Göran Andersson" <guffa@guffa.co mschrieb:
                  >>>>You are able to declare inside a very deep scope without assigning
                  >>>>Your code is checked in a very deep way while typing.
                  >>>>>
                  >>>>Both I miss very much in C#
                  >>>>
                  >>>I don't see how VB.NET is any different from C# in either of those
                  >>>aspects.
                  >>>
                  >>I assume Cor refers to VB's background compilation with the latter
                  >>point, a feature that is not present in C# currently.
                  >>
                  >But it is.
                  >
                  What? Background compilation and error detection on the fly as you type?
                  >
                  Yes.

                  --
                  Göran Andersson
                  _____
                  Göran Anderssons privata hemsida.

                  Comment

                  • =?ISO-8859-1?Q?G=F6ran_Andersson?=

                    #24
                    Re: Is VB Caca??

                    Scott M. wrote:
                    >But it is.
                    >
                    No, it's not. In VB.NET, as soon as you move your cursor off the current
                    line, the dynamic compilation feature of the language/VS.NET will check the
                    code on that line for syntax and compile errors and you will get the
                    infamous "blue wavy underline" right away.
                    Yes. That's how it works in C# too. Only as it's not line based, it will
                    also do the check if you pause for a second while typing a line.
                    In C#, you must build your code to get the same syntax checking. C# is not
                    dynamically compiled like VB.NET is.
                    In Visual Stuido 2005 it is.
                    It's too bad, because it's really the main reason I haven't move to more
                    development in C# yet.
                    I see a move coming up... :)

                    --
                    Göran Andersson
                    _____
                    Göran Anderssons privata hemsida.

                    Comment

                    • Herfried K. Wagner [MVP]

                      #25
                      Re: Is VB Caca??

                      "Göran Andersson" <guffa@guffa.co mschrieb:
                      >>>>>You are able to declare inside a very deep scope without assigning
                      >>>>>Your code is checked in a very deep way while typing.
                      >>>>>>
                      >>>>>Both I miss very much in C#
                      >>>>>
                      >>>>I don't see how VB.NET is any different from C# in either of those
                      >>>>aspects.
                      >>>>
                      >>>I assume Cor refers to VB's background compilation with the latter
                      >>>point, a feature that is not present in C# currently.
                      >>>
                      >>But it is.
                      >>
                      >What? Background compilation and error detection on the fly as you type?
                      >
                      Yes.
                      Yep, but that's not supported in the completeness it's supported in VB. For
                      C#, only a simple syntax check is performed, but VB's background compiler
                      detects far more errors.

                      --
                      M S Herfried K. Wagner
                      M V P <URL:http://dotnet.mvps.org/>
                      V B <URL:http://classicvb.org/petition/>

                      Comment

                      • Herfried K. Wagner [MVP]

                        #26
                        Re: Is VB Caca??

                        Cor,

                        "Cor Ligthert [MVP]" <notmyfirstname @planet.nlschri eb:
                        I would be glad if it would compile in C#, I am not doing only VB.Net you
                        know.
                        You cannot expect C# to behave the way VB does and vice-versa. If this was
                        the case, we would only need a single .NET programming language.

                        --
                        M S Herfried K. Wagner
                        M V P <URL:http://dotnet.mvps.org/>
                        V B <URL:http://classicvb.org/petition/>

                        Comment

                        • Herfried K. Wagner [MVP]

                          #27
                          Re: Is VB Caca??

                          Addendum:

                          Sample:

                          \\\
                          string s;
                          s = s.ToUpper();
                          ///

                          For C#, the warning will only be shown after compiling the project, whereas
                          VB's background compiler would detect immediately.

                          --
                          M S Herfried K. Wagner
                          M V P <URL:http://dotnet.mvps.org/>
                          V B <URL:http://classicvb.org/petition/>

                          Comment

                          • =?ISO-8859-1?Q?G=F6ran_Andersson?=

                            #28
                            Re: Is VB Caca??

                            Cor Ligthert [MVP] wrote:
                            Goran
                            >
                            beside what Herfried wrote
                            >
                            A a very simple one, however is in my idea good maintanable
                            \\\
                            Dim x As Integer
                            While x < 10
                            x += 1
                            End While
                            ///
                            >
                            \\\
                            int x;
                            while (x < 10)
                            {
                            x += 1;
                            }
                            ///
                            As sample does not go,while it is very handy.
                            >
                            (Or maybe is there a setting I don't know)
                            >
                            Cor
                            >
                            >
                            Oh, I see.

                            What you are talking about is implicit initialisation of local
                            variables. I wouldn't use that in a deep scope anyway, as the variable
                            is only initialised when the method starts, not at the line where you
                            declare it.

                            Example:

                            Dim s As String
                            s = String.Empty

                            Dim i As Integer
                            For i = 1 To 10
                            Dim x As Integer
                            x += 1
                            s += x.ToString + ","
                            Next

                            This will not produce the string "1,1,1,1,1,1,1, 1,1,1," but the string
                            "1,2,3,4,5,6,7, 8,9,10,", as the value of x is retained outside of it's
                            scope. The variable is created and initialised when the method starts,
                            and the placement of the Dim statement only decides it's scope.

                            In C# the variable can not be initialised outside of it's scope, so you
                            can't have a situation where you use a variable that retains it's value
                            outside the scope.

                            --
                            Göran Andersson
                            _____
                            Göran Anderssons privata hemsida.

                            Comment

                            • Tom Leylan

                              #29
                              Re: Is VB Caca??

                              It was my attempt to turn a potential language war thread into something
                              more along the lines of a discussion. I was hoping people would understand
                              that the language they use isn't the only one and their particular needs not
                              the needs of everybody.

                              When somebody writes that something is "easier" (say the UCASE() function)
                              one should consider that it is easier to them and perhaps easier to the
                              other people in their club but not easier to everybody. Following a
                              language-agnostic methodology is probably "easier" if one switches between
                              languages regularly.

                              It was my hope I could jump in before somebody claimed that VB.Net is new
                              and that C# is the end of a generation or suggested that people preferred
                              punch cards to disk drives because they are more portable (which of course
                              they aren't unless 2 GB of punch cards can fit on the end of a keychain) but
                              alas that has already been posted.

                              If I were to guess I'd say VB.Net is making inroads into the corporation
                              precisely because it isn't VB6.


                              "Tony K" <king-tony2@NOSPAMcom cast.netwrote.. .
                              Wow!!
                              >
                              "Tom Leylan" <tleylan@nospam .netwrote in message
                              news:uGP8q4OaHH A.808@TK2MSFTNG P04.phx.gbl...
                              >"RobinS" <RobinS@NoSpam. yah.nonewrote..
                              >>Why do you hang out here if you don't like VB?
                              >>
                              >Hi Robin: I realize your question was directed to Göran but I thought
                              >I'd take a stab at it since you seem like a reasonable person.
                              >Notwithstandin g your attempts in microsoft.publi c.dotnet.genera l to get
                              >people to stop posting questions about why their modem won't dial and
                              >such :-)
                              <snip>



                              Comment

                              • Scott M.

                                #30
                                Re: Is VB Caca??

                                Sounds like you have a case of diarrhea of the fingers to me. Seriously,
                                all that for an innocuous 11 word reply? And, then again for a one word
                                reply?


                                "Tom Leylan" <tleylan@nospam .netwrote in message
                                news:u5VFZRWaHH A.1296@TK2MSFTN GP02.phx.gbl...
                                It was my attempt to turn a potential language war thread into something
                                more along the lines of a discussion. I was hoping people would
                                understand that the language they use isn't the only one and their
                                particular needs not the needs of everybody.
                                >
                                When somebody writes that something is "easier" (say the UCASE() function)
                                one should consider that it is easier to them and perhaps easier to the
                                other people in their club but not easier to everybody. Following a
                                language-agnostic methodology is probably "easier" if one switches between
                                languages regularly.
                                >
                                It was my hope I could jump in before somebody claimed that VB.Net is new
                                and that C# is the end of a generation or suggested that people preferred
                                punch cards to disk drives because they are more portable (which of course
                                they aren't unless 2 GB of punch cards can fit on the end of a keychain)
                                but alas that has already been posted.
                                >
                                If I were to guess I'd say VB.Net is making inroads into the corporation
                                precisely because it isn't VB6.
                                >
                                >
                                "Tony K" <king-tony2@NOSPAMcom cast.netwrote.. .
                                >Wow!!
                                >>
                                >"Tom Leylan" <tleylan@nospam .netwrote in message
                                >news:uGP8q4OaH HA.808@TK2MSFTN GP04.phx.gbl...
                                >>"RobinS" <RobinS@NoSpam. yah.nonewrote..
                                >>>Why do you hang out here if you don't like VB?
                                >>>
                                >>Hi Robin: I realize your question was directed to Göran but I thought
                                >>I'd take a stab at it since you seem like a reasonable person.
                                >>Notwithstandi ng your attempts in microsoft.publi c.dotnet.genera l to get
                                >>people to stop posting questions about why their modem won't dial and
                                >>such :-)
                                <snip>
                                >
                                >
                                >

                                Comment

                                Working...