VB.NET or C#.NET ???

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jon Skeet [C# MVP]

    #46
    Re: VB.NET or C#.NET ???

    Cor Ligthert [MVP] <notmyfirstname @planet.nl> wrote:

    <snip>
    [color=blue]
    > I personal find the one line in basic as well not nice, however to start
    > talking about that the underscore is bad to use, is for me a little bit
    > childness argument.
    >
    > They are in my idea for sure on every Latin character keyboard in the world,
    > from which I am not so sure as that is with bracelets. And so we can go on
    > and on with trying to find for the result absolute not important arguments.[/color]

    Where did anyone complain about the choice of character? As I read it,
    the complaint was that it was necessary to use anything at all to
    signify a continuation onto the next line, not the particular character
    chosen to represent it.

    --
    Jon Skeet - <skeet@pobox.co m>
    http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
    If replying to the group, please do not mail me too

    Comment

    • Terry Burns

      #47
      Re: VB.NET or C#.NET ???

      Obsolutley correct.



      Terry Burns



      "Jon Skeet [C# MVP]" <skeet@pobox.co m> wrote in message
      news:MPG.1e5b16 5af9f54b5398ce2 b@msnews.micros oft.com...[color=blue]
      > Cor Ligthert [MVP] <notmyfirstname @planet.nl> wrote:
      >
      > <snip>
      >[color=green]
      >> I personal find the one line in basic as well not nice, however to start
      >> talking about that the underscore is bad to use, is for me a little bit
      >> childness argument.
      >>
      >> They are in my idea for sure on every Latin character keyboard in the
      >> world,
      >> from which I am not so sure as that is with bracelets. And so we can go
      >> on
      >> and on with trying to find for the result absolute not important
      >> arguments.[/color]
      >
      > Where did anyone complain about the choice of character? As I read it,
      > the complaint was that it was necessary to use anything at all to
      > signify a continuation onto the next line, not the particular character
      > chosen to represent it.
      >
      > --
      > Jon Skeet - <skeet@pobox.co m>
      > http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
      > If replying to the group, please do not mail me too[/color]


      Comment

      • Cor Ligthert [MVP]

        #48
        Re: VB.NET or C#.NET ???

        Jon,
        [color=blue]
        > Hang on a sec - you say that someone who likes C# shouldn't criticise
        > VB.NET, but you're quite happy (as someone who likes VB.NET) to
        > criticise the choice of keywords in C#? That doesn't seem entirely fair
        > to me.
        >[/color]

        No I do not, you probably forgot the text I wrote (see below). By the way, I
        don't find C# a bad program language, I don't know where you got that idea.
        I find at least for UI type programs VBNet better, which text means direct
        that there are in my opinion things that can better be done with C# or any
        other C language.
        [color=blue][color=green]
        >> I have not any problem by the way with Static in C# because that is used
        >> because of legacy reasons. However I am glad they took (because they
        >> were
        >> able to do that) another word meaningful word in VBNet for that.[/color][/color]

        For you is legacy maybe a bad word, for me it is affected with backward
        compatibility. Maybe should I have used that. However I could not resist :-)

        :-)

        Cor


        Comment

        • Herfried K. Wagner [MVP]

          #49
          Re: VB.NET or C#.NET ???

          "Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us >
          schrieb:[color=blue][color=green][color=darkred]
          >>> Also IMO they made weird selection for the new reserved words (
          >>> overridable, mustinherit , etc ) instead of the set of them used in most
          >>> other languages ( abstract , virtual, etc ) almost like if they wanted
          >>> to looks diferent from the rest of the languages.[/color]
          >>
          >> I believe 'Overridable' is more meaningful than 'virtual' and
          >> 'MustInherit' is more meaningful than 'abstract'. 'virtual' and
          >> 'abstract' are far too generic and not self-explaining.[/color]
          >
          > Just check the other posts here, for a non english speaking person they
          > are not that meaningful in the first place.[/color]

          I am a native German speaker and I find them more meaningful.
          'Overridable'/'Overrides' is more consistent than 'virtual'/'override' as is
          'MustInherit'/'Inherits' vs. 'abstract'/'<class name> : <...>'.
          [color=blue]
          > also virtual & abstract are universaly used , all the books use them
          > as well as all the mainstream languages.[/color]

          Well, but that's not a guarantee that those terms are a good choice.
          [color=blue]
          > but again, nothing is worse than the _ at the end of the line to split an
          > instruction, does anybody has any info of why it was carried out to vb.net
          > ?[/color]

          Who knows...

          --
          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]

            #50
            Re: VB.NET or C#.NET ???

            "Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us >
            schrieb:[color=blue][color=green]
            >>I agree about the underscore used in the line endings. That's always been
            >>a pest. However, as far as the other comment of the reserved words, you
            >>must remember that since the beginning, basic and visual basic has always
            >>strived to be the "readable" language. MustInherit and Overrides is more
            >>understandabl e when reading code than Abstract and Virtual (not to mention
            >>Static, Void, and others...)[/color]
            >
            > I beg to differ , all the books about OOP use abstract and virtual in
            > fact I think that VB.net is the only mainstream language that do not use
            > that words for the conpcets they represent.[/color]

            Well, take inheritance of another sample. VB uses 'Inherits', Java and J#
            use 'extends' and C# uses ' : '. Which one is the best? Did anybody count
            the number of occurances of each of the terms in OOP books? I think the
            primary goal is consistency inside of each programming language's syntax
            followed from choosing appropriate self-explaining terms instead of using
            stupid and sub-optimal terms which have been carried forward for
            compatibility reasons for decades.

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

            Comment

            • Cor Ligthert [MVP]

              #51
              Re: VB.NET or C#.NET ???

              Isgnacio,

              You are consequently talking about other languages. What languages do you
              mean. The set of languages you are in my opinion talking about is really
              small and is hug only because it exist in so many different tastes.

              See this schema where they for this languages had to stretch the schema.



              The languages you referring too can not tip to the consistent language as
              Basic (and more). However have some legacy behaviour (needed for backward
              compatibility in what is written about it). What should not mean in my
              opinion that a new language should inherit that legacy in the same way as a
              new root in that family should not avoid to keep using that legacy/backward
              cmpatibility..

              If it was as you write, than English speaking people would still eat *flesh*
              instead of *meat*.

              Cor


              Comment

              • Cor Ligthert [MVP]

                #52
                Re: VB.NET or C#.NET ???

                Jon and Terry,
                [color=blue]
                > Where did anyone complain about the choice of character? As I read it,
                > the complaint was that it was necessary to use anything at all to
                > signify a continuation onto the next line, not the particular character
                > chosen to represent it.
                >[/color]
                Sorry, I have read this
                *one you have to use the pesky _ at the end*

                My English is of course not as good as you Brittains, however I think that I
                understood very well what is written.

                By the way, in this do you or to use a *contiunation* character or an *end*
                character, which natural would be the hyphen and the dot. I think that it is
                not needed to explain for you that both don't really fit.

                Cor


                Comment

                • Jon Skeet [C# MVP]

                  #53
                  Re: VB.NET or C#.NET ???

                  Cor Ligthert [MVP] <notmyfirstname @planet.nl> wrote:[color=blue]
                  > Jon and Terry,
                  >[color=green]
                  > > Where did anyone complain about the choice of character? As I read it,
                  > > the complaint was that it was necessary to use anything at all to
                  > > signify a continuation onto the next line, not the particular character
                  > > chosen to represent it.[/color][/color]
                  [color=blue]
                  > Sorry, I have read this
                  > *one you have to use the pesky _ at the end*
                  >
                  > My English is of course not as good as you Brittains, however I think that I
                  > understood very well what is written.[/color]

                  Sorry, but I think you've misunderstood. If someone were to write
                  (about C#) "I can't stand all those pesky semi-colons at the end of
                  statements" I would understand them to mean that they would prefer to
                  not have to use any statement termination symbol at all, not that
                  they'd prefer a different character.
                  [color=blue]
                  > By the way, in this do you or to use a *contiunation* character or an *end*
                  > character, which natural would be the hyphen and the dot. I think that it is
                  > not needed to explain for you that both don't really fit.[/color]

                  Now it's my turn to not understand. I've no idea whether you've just
                  asked me to do something or not, or what it is if you *are* asking me
                  to do something.

                  --
                  Jon Skeet - <skeet@pobox.co m>
                  http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
                  If replying to the group, please do not mail me too

                  Comment

                  • Jon Skeet [C# MVP]

                    #54
                    Re: VB.NET or C#.NET ???

                    Cor Ligthert [MVP] <notmyfirstname @planet.nl> wrote:[color=blue][color=green]
                    > > Hang on a sec - you say that someone who likes C# shouldn't criticise
                    > > VB.NET, but you're quite happy (as someone who likes VB.NET) to
                    > > criticise the choice of keywords in C#? That doesn't seem entirely fair
                    > > to me.[/color]
                    >
                    > No I do not, you probably forgot the text I wrote (see below).[/color]

                    Which part are you arguing with? It seems fairly clear to me - you've
                    criticised C#'s choice of keywords, and said at the same time that no-
                    one with a preference for C# should criticise VB.NET's choice of
                    keywords.
                    [color=blue]
                    > By the way, I
                    > don't find C# a bad program language, I don't know where you got that idea.[/color]

                    I never claimed you did find C# a bad program language.
                    [color=blue]
                    > I find at least for UI type programs VBNet better, which text means direct
                    > that there are in my opinion things that can better be done with C# or any
                    > other C language.[/color]

                    That's a logical fallacy. I could make up a language (call it BadJon,
                    for instance) which is terrible at *everything*. By your logic, saying
                    that VB.NET is better than BadJon for UI programs implies that BadJon
                    is better than VB.NET at other things. There's just no such
                    implication.
                    [color=blue][color=green][color=darkred]
                    > >> I have not any problem by the way with Static in C# because that is used
                    > >> because of legacy reasons. However I am glad they took (because they
                    > >> were
                    > >> able to do that) another word meaningful word in VBNet for that.[/color][/color]
                    >
                    > For you is legacy maybe a bad word, for me it is affected with backward
                    > compatibility. Maybe should I have used that. However I could not resist :-)[/color]

                    I have no problem with the word "legacy". What I *do* have an objection
                    to is the idea that the validity of a criticism of any language is
                    dependent on the person making that criticism. How can that possibly be
                    so? If we were to write exactly the same sentence about a particular
                    VB.NET keyword, why would it be any more true when you wrote it than
                    when I wrote it?

                    While we're talking about "static" however, consider this: VB.NET
                    itself uses the keyword "Static", and it neither means the same as C#'s
                    static, nor does it mean that it has "non-changeable content". It means
                    the same as static does in C *for a local variable*.

                    --
                    Jon Skeet - <skeet@pobox.co m>
                    http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
                    If replying to the group, please do not mail me too

                    Comment

                    • Michael D. Ober

                      #55
                      Re: VB.NET or C#.NET ???

                      In C and C# you must use a semi-colon to indicate the end of a statement.
                      This allows statements to continue across multiple lines without a
                      continuation character. In VB, statements are only one line long unless
                      they have a continuation character. Both languages support multiple
                      statements on a single line - C# via adding a statement after the semi-colon
                      and VB by adding a colon between statements. This is a syntax issue only,
                      but it plays directly into readability of the language. Which one you like
                      depends on your preferences.

                      Mike Ober.

                      "Jon Skeet [C# MVP]" <skeet@pobox.co m> wrote in message
                      news:MPG.1e5b32 e2fa86fec198ce2 c@msnews.micros oft.com...[color=blue]
                      > Cor Ligthert [MVP] <notmyfirstname @planet.nl> wrote:[color=green]
                      > > Jon and Terry,
                      > >[color=darkred]
                      > > > Where did anyone complain about the choice of character? As I read it,
                      > > > the complaint was that it was necessary to use anything at all to
                      > > > signify a continuation onto the next line, not the particular[/color][/color][/color]
                      character[color=blue][color=green][color=darkred]
                      > > > chosen to represent it.[/color][/color]
                      >[color=green]
                      > > Sorry, I have read this
                      > > *one you have to use the pesky _ at the end*
                      > >
                      > > My English is of course not as good as you Brittains, however I think[/color][/color]
                      that I[color=blue][color=green]
                      > > understood very well what is written.[/color]
                      >
                      > Sorry, but I think you've misunderstood. If someone were to write
                      > (about C#) "I can't stand all those pesky semi-colons at the end of
                      > statements" I would understand them to mean that they would prefer to
                      > not have to use any statement termination symbol at all, not that
                      > they'd prefer a different character.
                      >[color=green]
                      > > By the way, in this do you or to use a *contiunation* character or an[/color][/color]
                      *end*[color=blue][color=green]
                      > > character, which natural would be the hyphen and the dot. I think that[/color][/color]
                      it is[color=blue][color=green]
                      > > not needed to explain for you that both don't really fit.[/color]
                      >
                      > Now it's my turn to not understand. I've no idea whether you've just
                      > asked me to do something or not, or what it is if you *are* asking me
                      > to do something.
                      >
                      > --
                      > Jon Skeet - <skeet@pobox.co m>
                      > http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
                      > If replying to the group, please do not mail me too[/color]



                      Comment

                      • _AnonCoward

                        #56
                        Re: VB.NET or C#.NET ???


                        "Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us >
                        : wrote in message news:%23gNP97MM GHA.3332@TK2MSF TNGP10.phx.gbl. ..
                        : H,
                        :
                        :
                        : The only thing I do not understand why is still in place is that VB.net
                        : demand than the entire sentence be written in one line, if you want to
                        : split it in more than one you have to use the pesky _ at the end, I
                        : can't understand why that has been dragged all along.


                        I look at it this way. I rarely need to wrap code across multiple lines -
                        most of the code I write is single line statements or block statements. In
                        VB, I don't have to concern myself with making sure to mark the end of every
                        line of code when I'm finished with it as I do in C#. I simply press the
                        enter key (which I am also obligated to do in C# as well anyway) and move to
                        the next line. I find the constant need for the trailing ';' characters in
                        C# to be a far more pesky than the occasional '_' character in VB. Besides,
                        if VB were to do away with the new-line character as the terminator, then
                        they'd have to replace it with a variation of the C ";" approach. What would
                        be the point of that?


                        Of course, when I actually do get into a C# or Java project, I stop noticing
                        the fact that I'm constantly pressing the ";" key and just do it. It becomes
                        second nature almost immediately. So too in VB - about the only time I
                        routinely wrap lines is in multi-parameter function statements and the
                        occasional string concatenation. As with the ";" character in C#, I really
                        don't notice the "_" character after the first pass or so. As with most
                        things regarding VB vs. C#, this is simply a matter of style and has nothing
                        to do with the languages themselves.


                        : Also IMO they made weird selection for the new reserved words (
                        : overridable, mustinherit , etc ) instead of the set of them used in
                        : most other languages ( abstract , virtual, etc ) almost like if they
                        : wanted to looks diferent from the rest of the languages.


                        It seems to me that VB (and basic before it) has always been written in such
                        a way that it is largely self documenting. The keywords of VB.net strike me
                        as keeping with that trend. In VB, if you must inherit a class, it is marked
                        as "MustInheri t". That strikes me as being much more self-evident statement
                        than the keyword "abstract" used in elsewhere. In this same vein, I think
                        declaring functions or members of a class as "Shared" is much clearer than
                        flagging them as "static" (implying they never change which of course they
                        can). The reserved keywords of VB are only weird when you are first
                        introduced to them.


                        That said, I am English speaking and so I find the language construction of
                        VB very natural and obvious. I recognize that someone who does not speak
                        English may not share in that assessment. Even so, C#, like C/C++ and Java
                        before it, are also based on English terminology (switch, case, for, if,
                        break, continue, abstract, event, private, protected, class, structure,
                        object, etc., etc.). Therefore, I don't think that learning VB for the non
                        English speaking programmer is significantly harder than learning C# on that
                        particular basis.


                        Ralf
                        --
                        --
                        ----------------------------------------------------------
                        * ^~^ ^~^ *
                        * _ {~ ~} {~ ~} _ *
                        * /_``>*< >*<''_\ *
                        * (\--_)++) (++(_--/) *
                        ----------------------------------------------------------
                        There are no advanced students in Aikido - there are only
                        competent beginners. There are no advanced techniques -
                        only the correct application of basic principles.


                        Comment

                        • Homer J Simpson

                          #57
                          Re: VB.NET or C#.NET ???


                          "Milan" <milan_vaclavik @centrum.cz> wrote in message
                          news:1139775796 .530146.256950@ g47g2000cwa.goo glegroups.com.. .
                          [color=blue]
                          > I would like to ask you this question. I am experienced in programming
                          > in VBA and I want to upgrade my knowledge to Visual Studio 2005 now. I
                          > hesitate whether to aim to VB or C#.[/color]

                          Supposedly C# programmers earn more $$$ than VB programmers.
                          [color=blue]
                          > Since I am familiar with VBA I
                          > would like to choose VB but I heart from my colleagues that VB is a
                          > "dead" language[/color]

                          Nope. Bill G still likes Basic. It is also much better at self documenting
                          than any other language.







                          Comment

                          • Jon Skeet [C# MVP]

                            #58
                            Re: VB.NET or C#.NET ???

                            Michael D. Ober <obermd.@.alum. mit.edu.nospam> wrote:[color=blue]
                            > In C and C# you must use a semi-colon to indicate the end of a statement.
                            > This allows statements to continue across multiple lines without a
                            > continuation character. In VB, statements are only one line long unless
                            > they have a continuation character. Both languages support multiple
                            > statements on a single line - C# via adding a statement after the semi-colon
                            > and VB by adding a colon between statements. This is a syntax issue only,
                            > but it plays directly into readability of the language. Which one you like
                            > depends on your preferences.[/color]

                            Absolutely. There are definitely swings and roundabouts. As an
                            anonymous poster wrote, there are far more lines *without*
                            continuations than ones *with* - but then again, not being quite as
                            white-space sensitive makes it easier to cut and paste code in C#, and
                            encourages lines to be wrapped more often. (i.e. in VB.NET there's more
                            of a temptation to try to get a statement onto one line so as to avoid
                            the continuation character. Not much more, but a little bit...)

                            --
                            Jon Skeet - <skeet@pobox.co m>
                            http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
                            If replying to the group, please do not mail me too

                            Comment

                            • Jon Skeet [C# MVP]

                              #59
                              Re: VB.NET or C#.NET ???

                              Homer J Simpson <nobody@nowhere .com> wrote:[color=blue][color=green]
                              > > Since I am familiar with VBA I
                              > > would like to choose VB but I heart from my colleagues that VB is a
                              > > "dead" language[/color]
                              >
                              > Nope. Bill G still likes Basic. It is also much better at self documenting
                              > than any other language.[/color]

                              I've heard that said before, but never been given any evidence for it.
                              Of course, in VS.NET 2003, if you're using VB.NET you can't produce XML
                              documentation without extra plug-ins, so your code had *better* be
                              self-documenting... (I'm not sure why it was missed out of VB.NET to
                              start with - I'm very glad it's finally here in VS 2005.)

                              --
                              Jon Skeet - <skeet@pobox.co m>
                              http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
                              If replying to the group, please do not mail me too

                              Comment

                              • Kevin Spencer

                                #60
                                Re: VB.NET or C#.NET ???

                                In addition, although this is not something that should be done very often,
                                it allows one to put multiple statements on the same line, and thus compact
                                your code a bit. There are a few situations where this comes in handy, such
                                as in switch statements.

                                switch (foo)
                                {
                                case (1): someFunction(); break;
                                case (2): SomeOtherFuncti on(); break;
                                //...
                                }

                                --
                                HTH,

                                Kevin Spencer
                                Microsoft MVP
                                ..Net Developer
                                We got a sick zebra a hat,
                                you ultimate tuna.


                                "Jon Skeet [C# MVP]" <skeet@pobox.co m> wrote in message
                                news:MPG.1e5b9a cbdb5fbdb798ce2 f@msnews.micros oft.com...[color=blue]
                                > Michael D. Ober <obermd.@.alum. mit.edu.nospam> wrote:[color=green]
                                >> In C and C# you must use a semi-colon to indicate the end of a statement.
                                >> This allows statements to continue across multiple lines without a
                                >> continuation character. In VB, statements are only one line long unless
                                >> they have a continuation character. Both languages support multiple
                                >> statements on a single line - C# via adding a statement after the
                                >> semi-colon
                                >> and VB by adding a colon between statements. This is a syntax issue
                                >> only,
                                >> but it plays directly into readability of the language. Which one you
                                >> like
                                >> depends on your preferences.[/color]
                                >
                                > Absolutely. There are definitely swings and roundabouts. As an
                                > anonymous poster wrote, there are far more lines *without*
                                > continuations than ones *with* - but then again, not being quite as
                                > white-space sensitive makes it easier to cut and paste code in C#, and
                                > encourages lines to be wrapped more often. (i.e. in VB.NET there's more
                                > of a temptation to try to get a statement onto one line so as to avoid
                                > the continuation character. Not much more, but a little bit...)
                                >
                                > --
                                > Jon Skeet - <skeet@pobox.co m>
                                > http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
                                > If replying to the group, please do not mail me too[/color]


                                Comment

                                Working...