VB compiler VS CS compiler

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

    #16
    Re: VB compiler VS CS compiler

    Can you give an example?


    "Dave" <DavidWills1@ho tmail.com> wrote in message
    news:%23cRnUf9V FHA.2960@TK2MSF TNGP15.phx.gbl. ..
    : Well, you can declare types in an interface in VB.NET, while it
    : generates an error in CS. Sth like an abstract class in an interface
    : "(Mustinher it" in VB)....So, i think wheher CS or VB is doing sth
    : wrong here.
    :
    : "Rob Windsor [MVP]" <rob.windsor.no .spam@gmail.com > wrote in message
    : news:%23FZ2QX9V FHA.584@TK2MSFT NGP15.phx.gbl.. .
    : > I'm curious, what "real OOP" can you do in C# that can't be done in
    : > VB.NET?
    :
    :



    Comment

    • Dave

      #17
      Re: VB compiler VS CS compiler

      "_AnonCowar d" <abc@xyz.com> wrote in message
      news:n95he.2492 5$vi2.927267@tw ister.southeast .rr.com...[color=blue]
      > Can you give an example?[/color]

      This is what i found in one of the posts to
      microsoft.publi c.dotnet.langua ges.vb on Friday, April 15, 2005 3:12 PM

      The following will compile in VB.NET 2003
      -------------------------------------------------------

      Public Interface IRenderable
      Sub Render()
      MustInherit Class Engine
      MustOverride Sub TurnOn()
      Interface IAutomatic
      Sub Start()
      End Interface
      End Class
      End Interface

      --------------------------------

      Do exactly the same thing in C#.NET 2003; it generates an error. It won't
      compile.


      Comment

      • Nick Malik [Microsoft]

        #18
        Re: VB compiler VS CS compiler

        how does this make C# a real OO language where VB.Net is not?

        I see a minor language difference. I don't see something that prevents you
        from describing VB as an OO language.

        --
        --- Nick Malik [Microsoft]
        MCSD, CFPS, Certified Scrummaster
        http://blogs.msdn.com/nickmalik

        Disclaimer: Opinions expressed in this forum are my own, and not
        representative of my employer.
        I do not answer questions on behalf of my employer. I'm just a
        programmer helping programmers.
        --
        "Dave" <DavidWills1@ho tmail.com> wrote in message
        news:uNeK8c%23V FHA.228@TK2MSFT NGP12.phx.gbl.. .[color=blue]
        > "_AnonCowar d" <abc@xyz.com> wrote in message
        > news:n95he.2492 5$vi2.927267@tw ister.southeast .rr.com...[color=green]
        >> Can you give an example?[/color]
        >
        > This is what i found in one of the posts to
        > microsoft.publi c.dotnet.langua ges.vb on Friday, April 15, 2005 3:12 PM
        >
        > The following will compile in VB.NET 2003
        > -------------------------------------------------------
        >
        > Public Interface IRenderable
        > Sub Render()
        > MustInherit Class Engine
        > MustOverride Sub TurnOn()
        > Interface IAutomatic
        > Sub Start()
        > End Interface
        > End Class
        > End Interface
        >
        > --------------------------------
        >
        > Do exactly the same thing in C#.NET 2003; it generates an error. It won't
        > compile.
        >
        >[/color]


        Comment

        • Cor Ligthert

          #19
          Re: VB compiler VS CS compiler

          Dave,

          I hope that I don't kick to many people with this message. In my opinion is
          OO not direct programming related.

          When there was 100 years ago a house build in my country, than most parts
          were created on the place where the building would come.

          Now they are designed first where as much elements from prefab classes are
          used.

          For me is that the essence of OOP. That there is syntax around it tells
          nothing. The same as with building houses are (and should) the methods that
          creates the classes every time be better and better.

          Just my thought,

          Cor


          Comment

          • Dave

            #20
            Re: VB compiler VS CS compiler


            "Cor Ligthert" <notmyfirstname @planet.nl> wrote in message
            news:ObLPnrEWFH A.612@TK2MSFTNG P12.phx.gbl...[color=blue]
            > Dave,
            >
            > I hope that I don't kick to many people with this message. In my opinion
            > is OO not direct programming related.
            >
            > When there was 100 years ago a house build in my country, than most parts
            > were created on the place where the building would come.
            >
            > Now they are designed first where as much elements from prefab classes are
            > used.
            >
            > For me is that the essence of OOP. That there is syntax around it tells
            > nothing. The same as with building houses are (and should) the methods
            > that creates the classes every time be better and better.
            >
            > Just my thought,
            >
            > Cor[/color]

            You are right probably.... it might be a matter of personal taste. But
            believe me, coming from the world of VB6 into VB.NET was not only a "shock",
            but also the oop concepts were too odd to swallow. I couldn't really get
            on it...There were all those powerful object facilities in VB.NET...
            i just couldn't exploit them...maybe because of the background-VB syntax i
            had
            in my thinking patterns.
            The change to C# for me was a way to pass over that obstacle. Everything is
            where it has to be, the language is as brief and as original as possible...
            and it is now that i am realizing what OOP really is and what goes on at the
            heart of the
            framework.

            As i said...just my thought of course.





            Comment

            • Xepol

              #21
              RE: VB compiler VS CS compiler

              > for (cnt = 0; cnt < 20; cnt++)

              this loop runs from 0 to 19, 20 itterations.
              [color=blue]
              > For cnt = 0 To 20[/color]

              This loop runs from 0 to 20, 21 itterations.

              All of your loops have this flaw, something to watch out for as in the case
              of your test, the problem in each loop level tends to build up exponentially,
              in this case you would be running about 100*10000000 extra loops in your VB
              code, obviously not good for comparisons (and flat out evil if you are trying
              to exactly reproduce code).

              For cnt = 0 to 20 is equivalent to for (int cnt=0; cnt<=20; cnt++)

              Moving from a 1 based universe to a zero based universe can be annoying
              (every time I move from delphi strings to c strings it gives me a headache),
              but you gotta watch those details.

              - Clinton R. Johnson

              Comment

              Working...