C++ sucks for games

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

    #31
    Re: C++ sucks for games

    JKop schrieb:[color=blue][color=green]
    >>While I agree that the OP was trolling by posting his article to
    >>c.l.c++, it is still my opinion that he was in many parts correct and
    >>the "inspired" response was nothing but a display of complete
    >>ignorance. Many of the issues raised by the OP are truly something you
    >>need to know about (if you don't already), regardless of which
    >>programming language you prefer, IMHO.[/color]
    >
    >
    >
    > Ignorance? Arrogance maybe? (no pun intended)
    >
    > As for the issues raised being truly something you need to know about... do
    > you need to tell a child not to eat its own excrement? No. Why? It figures
    > that out for itself. If you're writing code and you have "new" all over the
    > place and you've no "delete"'s, then you'll figure out the aim of the whole
    > "Garbage Collection" ideal. I myself am not retarded, so I've no need for
    > "Garbage Collection". If, hypothetically speaking, I forsaw that I would
    > temporarily become retarded (a golfclub to the head maybe), then I would
    > make use of auto_ptr, but that has yet to happen.
    >
    > Isn't great how we're all entitled to our own opinions! ;-P
    >
    >
    > -JKop
    >[/color]

    Garbage Collection is not just for the retarded -- it becomes sort of an
    requirement when dealing with lock-free collections, for example. And
    you are wrong to believe that your programs won't leak memory just
    because you aren't retarded.


    Regards

    Comment

    • Lisptracker

      #32
      Re: C++ sucks for games

      "JKop" <NULL@NULL.NULL > news:aV6fd.3999 7$Z14.14413@new s.indigo.ie...[color=blue]
      >[color=green]
      > > C++ game developers spend a lot of their time debugging corrupted
      > > memory. Few, if any, compilers offer completely safe modes.[/color]
      >
      > AKA Retarded mode.[/color]

      With C++ you can't vary safe/fast mode on per function or per line
      basis.
      [color=blue][color=green]
      > > You can not even change function definitions while the program is
      > > running and see the effects live (the ultimate debugging tool).[/color]
      >
      > Nothing to do with the language. Such a debugging tool could be developed,
      > why not develop it?
      > I myself wouldn't use it.[/color]

      Actually, you can change program during execution (at least in VC++
      7.1) however in half of cases you have to stop and recompile it.
      [color=blue][color=green]
      > > Alternatively, you can't execute a small portion of the program
      > > without compiling and linking the whole thing, then bringing your game
      > > into a specific state where your portion of the code is being executed.[/color]
      >
      > That's because there's no such thing as "half a program". If you really want this, copy-paste it to another file and just append:
      >
      > int main(){}
      > to the end of it.[/color]

      Than cut and add "main()" to another file and stop/start program each
      time ??? In Lisp you can share intermediate data between small
      portions of the program.
      [color=blue][color=green]
      > > The static type system locks you into a certain design, and you can't
      > > *test* new ideas, when they come to you, without redesigning your
      > > whole class hierarchy.[/color]
      >
      > Bullshit. Vague bullshit.[/color]

      You forced to think of types all time. It's kind of unnecessary
      foresight in many cases.
      [color=blue][color=green]
      > > C++ is so inflexible, even those who do use it for games, have to
      > > write their game logic in some other language (usually very slow,
      > > inexpressive and still garbage collected). They also have to interface
      > > the two languages.[/color]
      >
      > Provide an example. I myself forsee no reason or motive to do or have to do > this.[/color]

      You have to use interpreter for scripting. Hardly It would be
      interpreter of C++.
      [color=blue][color=green]
      > > C++ lacks higher-order functions. Function objects emulate them
      > > poorly, are slow and a pain to use. Additionally, C++ type system does
      > > not work well with function objects.[/color]
      >
      > "function objects". Get over it! It's just syntatic sugar![/color]

      Really? IMHO they are very limited imitation of closures.
      [color=blue][color=green]
      > > C++ programs can not "think" of new code at run-time, and plug that
      > > new code into themselves in compiled form. Not easily, anyway.[/color]
      >
      > "think of new code at run-time". That's because it takes intelligence to
      > write code, something which computers lack. As for the code coming from
      > somewhere else, well it's done extremely easily actually - we call it
      > dynamic linkage.[/color]

      I.e. C++ self-reflection sucks.
      [color=blue][color=green]
      > > C++ coding feels very repetitive, for example, when writing class
      > > accessors, you often have to write const and non-const methods with
      > > completely identical function bodies. Just look at STL.[/color]
      >
      > Incorrect.
      >
      > If both function bodies are identical, then there's no need to write a non-
      > const version.
      >
      > If there exists both a const version and a non-const version, then this
      > indicates that one version alters the object, while the other doesn't.
      > Conclusion: different code.[/color]

      So "cut and paste" technology is used all time ;-))
      [color=blue]
      > You could also make the non-const version call the const version, and then
      > just do something extra.
      >[color=green]
      > > When programming in C++ you feel like a blind person trying to draw
      > > something. You don't _see_ the data structures that your procedures
      > > will operate on. Lisp programming is much more visual.[/color]
      >
      > "procedures "? Never heard of them. I've heard of "functions" alright. I must
      > say I don't... see... your argument, no pun intended.
      > If you have a function which takes in an object of a certain class, or as
      > you call it "data structure", then... (actually, it's so simple I'm not even > going to finish this paragraph).[/color]

      It means that on Lisp you can easily try current piece code to see it
      does well and write another small piece. In C++ you forced to write as
      much as possible before you start visualize results (maybe because
      "edit and continue" doesn't work properly?).
      [color=blue][color=green]
      > > C++ lacks automatic memory management and so it encourages copying
      > > objects around to make manual memory management manageable.[/color]
      >
      > int auto k = 4;
      >
      > int* auto p_w = new int(4);[/color]

      From MSDN:

      "The auto storage-class specifier declares an automatic variable, a
      variable with a local lifetime. It is the default storage-class
      specifier for block-scoped variable declarations

      An auto variable is visible only in the block in which it is declared.
      Few programmers use the auto keyword in declarations because all
      block-scoped objects not explicitly declared with another storage
      class are implicitly automatic. Therefore, the following two
      declarations are equivalent:

      // auto_keyword.cp p
      int main()
      {
      auto int i = 0; // Explicitly declared as auto.
      int j = 0; // Implicitly auto.
      }
      "
      Is that automatic memory managment ???
      [color=blue][color=green]
      > > Reference-counting schemes are usually slower than modern garbage
      > > collectors and also less general.[/color]
      >
      > Which "garbage collector"? "less general" = vague bullshit.[/color]

      What's the difference ??? Anyway reference-counting is slower than
      modern generational GCs.
      [color=blue][color=green]
      > > Most important, C++ syntax is irregular, and you often find yourself
      > > typing repetitive patterns again and again - a task easily automated
      > > in languages with simpler syntax.[/color]
      >
      > I don't see your argument. I've never encountered such.[/color]

      It means no macro. C preprocessor and templates is hardly comparable
      with Lisp macro.
      [color=blue][color=green]
      > > C++ programs are slow: even though the compilers are good at[/color][/color]
      [color=blue]
      > MS-DOS was written in C++. Window XP was written in C++. Linux was written
      > in C++.
      >
      > Come to think of it, what *wasn't* written in C++?[/color]

      You are mistaken: MS-DOS and Linux were not written in C++ (maybe
      because C++ compilers at that time were very buggy). And also very
      doubtful that Windows XP core was written in C++.

      Many many things were not written in C++.

      Lisptracker

      Comment

      • Joe Laughlin

        #33
        Re: C++ sucks for games

        JKop wrote:[color=blue][color=green][color=darkred]
        >>> Come to think of it, what *wasn't* written in C++?[/color]
        >>
        >> Linux comes to mind.[/color]
        >
        >
        > Really? What was it written in?
        >
        >
        >
        > -JKop[/color]

        C and assembly. Look at the source for it.

        And I don't think MS-DOS could've been written in C++, wasn't that before
        C++ was around?



        Comment

        • Howard

          #34
          [OT] Re: C++ sucks for games


          "Neo-LISPer" <neo_lisper@yah oo.com> wrote in message
          news:87k6tf9ev3 .fsf@yahoo.com. ..

          Personally, I couldn't care less! What're you trying to accomplish, change
          someone's mind? No, you're just trolling. So get lost, and let us do some
          real work.

          -Howard




          Comment

          • Petter Gustad

            #35
            Re: C++ sucks for games

            "Joe Laughlin" <Joseph.V.Laugh lin@boeing.com> writes:
            [color=blue]
            > And I don't think MS-DOS could've been written in C++, wasn't that before
            > C++ was around?[/color]

            The first native C++ compiler I used under DOS was Zortech C++. This
            must have been around 1988/1989.

            Petter
            --
            A: Because it messes up the order in which people normally read text.
            Q: Why is top-posting such a bad thing?
            A: Top-posting.
            Q: What is the most annoying thing on usenet and in e-mail?

            Comment

            • David Golden

              #36
              [OT] C++ sucks for games

              "Neo-LISPer" has been quoting the "Mike Cox" known-troll in his sig in
              some previous postings to comp.lang.lisp [1] I gave him the benefit of
              the doubt for a few posts, but that might tell you where he's coming
              from if you've encountered "Mike Cox" trolling before. For some reason
              "Mike Cox" started attempting to troll comp.lang.lisp a while back,
              too, it's even possible Neo-LISPer and Mike Cox are the same person.

              Note that it may more innocent (even if it is Mike Cox!), could be just
              the overenthusiasti c lisp newbie effect (no one more zealous than the
              recently converted) - if so, then, Neo-LISPer, please don't do that.
              Two wrongs don't make a right [2].

              I urge people in both language communities to write games in whatever
              languages they bloody well feel like, and to not feed the trolls. Like
              I probably just did by posting this. Gaah.

              [1]


              [2] See recent silly "Why Lisp Sucks for Games" thread on comp.lang.lisp
              caused by an article by someone self-identifying as a microsoft c++
              programmer and apparently feeling some compulsion to attack (somewhat
              poorly) the use of lisp in games. Or, better, don't...


              Comment

              • JKop

                #37
                Re: C++ sucks for games

                Florian Bachmann posted:
                [color=blue]
                > JKop schrieb:[color=green][color=darkred]
                >>>While I agree that the OP was trolling by posting his article to
                >>>c.l.c++, it is still my opinion that he was in many parts correct and
                >>>the "inspired" response was nothing but a display of complete
                >>>ignorance. Many of the issues raised by the OP are truly something you
                >>>need to know about (if you don't already), regardless of which
                >>>programmin g language you prefer, IMHO.[/color]
                >>
                >>
                >>
                >> Ignorance? Arrogance maybe? (no pun intended)
                >>
                >> As for the issues raised being truly something you need to know
                >> about... do you need to tell a child not to eat its own excrement? No.
                >> Why? It figures that out for itself. If you're writing code and you
                >> have "new" all over the place and you've no "delete"'s, then you'll
                >> figure out the aim of the whole "Garbage Collection" ideal. I myself
                >> am not retarded, so I've no need for "Garbage Collection". If,
                >> hypothetically speaking, I forsaw that I would temporarily become
                >> retarded (a golfclub to the head maybe), then I would make use of
                >> auto_ptr, but that has yet to happen.
                >>
                >> Isn't great how we're all entitled to our own opinions! ;-P
                >>
                >>
                >> -JKop
                >>[/color]
                >
                > Garbage Collection is not just for the retarded -- it becomes sort of
                > an requirement when dealing with lock-free collections, for example.
                > And you are wrong to believe that your programs won't leak memory just
                > because you aren't retarded.
                >
                >
                > Regards[/color]


                Perhaps. But I've been right thus far.


                -JKop

                Comment

                • Thomas Stegen

                  #38
                  Re: C++ sucks for games

                  JKop wrote:[color=blue]
                  > Ignorance? Arrogance maybe? (no pun intended)
                  >
                  > As for the issues raised being truly something you need to know about... do
                  > you need to tell a child not to eat its own excrement? No. Why? It figures
                  > that out for itself. If you're writing code and you have "new" all over the
                  > place and you've no "delete"'s, then you'll figure out the aim of the whole
                  > "Garbage Collection" ideal. I myself am not retarded, so I've no need for
                  > "Garbage Collection". If, hypothetically speaking, I forsaw that I would
                  > temporarily become retarded (a golfclub to the head maybe), then I would
                  > make use of auto_ptr, but that has yet to happen.[/color]

                  Depending on the amount of memory and the size of each allocated block
                  garbage collection can be faster, or manual handling can be faster. If
                  you have many small to medium sized objects then garbage collection is
                  faster, otherwise not so. Copious amount of research exist. Start
                  some where around here:http://www.hpl.hp.com/personal/Hans_Boehm/gc/.

                  Retarded? It has nothing to do with being retarded. Sometimes the
                  requirements of a program is such that you cannot predict when a
                  resource can be freed without designing this into your program
                  (I can't really think of many examples where this is not the case)
                  and that can be hard. When GC can sometimes even make your program
                  faster... No brainer. (And for the reading impaired, I am not
                  saying... Nah, figure it out yourself)

                  --
                  Thomas.

                  Comment

                  • md

                    #39
                    Re: C++ sucks for games


                    "Neo-LISPer" <neo_lisper@yah oo.com> wrote in message news:87k6tf9ev3 .fsf@yahoo.com. ..
                    [snip]

                    don't feed the troll!


                    Comment

                    • Vladimir Sedach

                      #40
                      Re: C++ sucks for games

                      JKop <NULL@NULL.NULL > writes:[color=blue][color=green]
                      > > The static type system locks you into a certain design, and you can't
                      > > *test* new ideas, when they come to you, without redesigning your
                      > > whole class hierarchy.[/color]
                      >
                      > Bullshit. Vague bullshit.[/color]

                      By any reasonable standards, C++'s type system is a brain-damaged
                      throwback to the 1960s. Much better static type systems can be found
                      in languages like Haskell and ML. Hell, there's even an assembler with
                      a better type system:

                      [color=blue][color=green]
                      > > C++ lacks higher-order functions. Function objects emulate them
                      > > poorly, are slow and a pain to use. Additionally, C++ type system does
                      > > not work well with function objects.[/color]
                      >
                      > "function objects". Get over it! It's just syntatic sugar![/color]

                      Yeah, and with just a bit more typing, you've got yourself a Turing
                      machine. You can do anything you want in C++, so why would you ever
                      want to switch to a better language?
                      [color=blue][color=green]
                      > > When programming in C++ you feel like a blind person trying to draw
                      > > something. You don't _see_ the data structures that your procedures
                      > > will operate on. Lisp programming is much more visual.[/color]
                      >
                      > "procedures "? Never heard of them. I've heard of "functions" alright. I must
                      > say I don't... see... your argument, no pun intended.[/color]

                      Where do you think the word "function" comes from? It comes from
                      mathematics, where it has a very well-defined meaning and certain very
                      well defined properties. One of these properties is that for any
                      input, it always returns the same output. This particular meaning has
                      been universally adopted by the computer science community. In almost
                      all languages (Miranda and Haskell are the only two exceptions I
                      know), what you call "functions" are actually procedures or
                      subroutines, in that they can return different outputs for the same
                      input. This includes pseudo "functional " languages like ML too, since
                      it has assignment, references and mutable arrays.

                      Vladimir

                      Comment

                      • Joe Laughlin

                        #41
                        Re: C++ sucks for games

                        Petter Gustad wrote:[color=blue]
                        > "Joe Laughlin" <Joseph.V.Laugh lin@boeing.com> writes:
                        >[color=green]
                        >> And I don't think MS-DOS could've been written in C++,
                        >> wasn't that before C++ was around?[/color]
                        >
                        > The first native C++ compiler I used under DOS was
                        > Zortech C++. This must have been around 1988/1989.
                        >
                        > Petter[/color]

                        And MS-DOS was first written in the early 80's.


                        Comment

                        • WTH

                          #42
                          Re: C++ sucks for games

                          <snip crap>

                          LOL, you're hilarious. Stop researching and write a game, then tell us what
                          you should write it in.

                          WTH


                          Comment

                          • Petter Gustad

                            #43
                            Re: C++ sucks for games

                            "Joe Laughlin" <Joseph.V.Laugh lin@boeing.com> writes:
                            [color=blue]
                            > Petter Gustad wrote:[color=green]
                            > > "Joe Laughlin" <Joseph.V.Laugh lin@boeing.com> writes:
                            > >[color=darkred]
                            > >> And I don't think MS-DOS could've been written in C++,
                            > >> wasn't that before C++ was around?[/color]
                            > >
                            > > The first native C++ compiler I used under DOS was
                            > > Zortech C++. This must have been around 1988/1989.[/color][/color]
                            [color=blue]
                            > And MS-DOS was first written in the early 80's.[/color]

                            That was my point...

                            Petter
                            --
                            A: Because it messes up the order in which people normally read text.
                            Q: Why is top-posting such a bad thing?
                            A: Top-posting.
                            Q: What is the most annoying thing on usenet and in e-mail?

                            Comment

                            • Espen Vestre

                              #44
                              Re: C++ sucks for games

                              Petter Gustad <newsmailcomp5@ gustad.com> writes:
                              [color=blue][color=green]
                              >> And MS-DOS was first written in the early 80's.[/color]
                              >
                              > That was my point...[/color]

                              I don't know what Tim Paterson used when he wrote the original QDOS in
                              6 weeks in 1980, but I very much doubt that it was C, which I think
                              was still a rather experimental thing used by strange cult of unixists
                              at that point.
                              --
                              (espen)

                              Comment

                              • Espen Vestre

                                #45
                                Re: C++ sucks for games

                                Petter Gustad <newsmailcomp5@ gustad.com> writes:
                                [color=blue][color=green]
                                >> And MS-DOS was first written in the early 80's.[/color]
                                >
                                > That was my point...[/color]

                                I don't know what Tim Paterson used when he wrote the original QDOS in
                                6 weeks in 1980, but I very much doubt that it was C, which I think
                                was still a rather experimental thing used by the strange cult of
                                unixists at that time.
                                --
                                (espen)

                                Comment

                                Working...