C++ sucks for games

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Neo-LISPer

    C++ sucks for games

    Hey

    Recently, I researched using C++ for game programming and here is what
    I found:

    C++ game developers spend a lot of their time debugging corrupted
    memory. Few, if any, compilers offer completely safe modes.

    Unsurprisingly, there is a very high failure rate among projects using
    C++ for modern game development.

    You can not even change function definitions while the program is
    running and see the effects live (the ultimate debugging tool).

    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.

    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.

    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.

    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.

    C++ programs can not "think" of new code at run-time, and plug that
    new code into themselves in compiled form. Not easily, anyway.

    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.

    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.

    Constructors and smart pointers make it hard to tell cheap operations
    from expensive ones.

    C++ lacks automatic memory management and so it encourages copying
    objects around to make manual memory management manageable.
    Reference-counting schemes are usually slower than modern garbage
    collectors and also less general.

    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. There are even books on C++
    patterns, and some C++ experts take pride in being able to execute
    those patterns with computer-like precision - something a computer
    should be doing to begin with.

    C++ programs are slow: even though the compilers are good at
    micro-optimizing the code, programmers waste their time writing
    repetitive patterns in C++ and debugging memory corruption instead of
    looking for better algorithms that are far more important for speed
    than silly micro-optimizations.

    It's hard to find good programmers for C++ projects, because most of
    the good programmers graduated to languages like Lisp or avoided C++
    altogether. C++ attracts unimaginative fellows with herd mentality.
    For creative projects, you want to avoid them like a plague.

    It is my opinion that all of the above makes C++ a very bad choice for
    commercial game development.
  • Nils O. Selåsdal

    #2
    Re: C++ sucks for games

    Neo-LISPer wrote:[color=blue]
    > Hey[/color]
    ...

    creative projects, you want to avoid them like a plague.[color=blue]
    >
    > It is my opinion that all of the above makes C++ a very bad choice for
    > commercial game development.[/color]
    My opinion to others:

    Do not feed the trolls. Please!

    Comment

    • Maahes

      #3
      Re: C++ sucks for games

      hmm. I remember vividly doing lisp at uni.
      I think the assignment was a simple long division problem. I remember that
      only a few people in the entire class managed to work out a way of achieving
      it... I problem that is a newbie would do in C without breaking a sweat.

      After that, no-one ever used lisp again...

      ...except the Jax & Daxter developers. Their game engine runs on an
      interpretted lisp platform (I believe) and has spawned some of the most
      impressive platformers I've ever seen...

      So the moral is....
      I don't know, but I won't be switching to Lisp any time soon...
      Maybe its good once you get the hang of it...
      But I think it may be too recursive & bottom-up programming for most brains
      to want to deal with...



      "Neo-LISPer" <neo_lisper@yah oo.com> wrote in message
      news:87k6tf9ev3 .fsf@yahoo.com. ..[color=blue]
      > Hey
      >
      > Recently, I researched using C++ for game programming and here is what
      > I found:
      >
      > C++ game developers spend a lot of their time debugging corrupted
      > memory. Few, if any, compilers offer completely safe modes.
      >
      > Unsurprisingly, there is a very high failure rate among projects using
      > C++ for modern game development.
      >
      > You can not even change function definitions while the program is
      > running and see the effects live (the ultimate debugging tool).
      >
      > 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.
      >
      > 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.
      >
      > 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.
      >
      > 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.
      >
      > C++ programs can not "think" of new code at run-time, and plug that
      > new code into themselves in compiled form. Not easily, anyway.
      >
      > 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.
      >
      > 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.
      >
      > Constructors and smart pointers make it hard to tell cheap operations
      > from expensive ones.
      >
      > C++ lacks automatic memory management and so it encourages copying
      > objects around to make manual memory management manageable.
      > Reference-counting schemes are usually slower than modern garbage
      > collectors and also less general.
      >
      > 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. There are even books on C++
      > patterns, and some C++ experts take pride in being able to execute
      > those patterns with computer-like precision - something a computer
      > should be doing to begin with.
      >
      > C++ programs are slow: even though the compilers are good at
      > micro-optimizing the code, programmers waste their time writing
      > repetitive patterns in C++ and debugging memory corruption instead of
      > looking for better algorithms that are far more important for speed
      > than silly micro-optimizations.
      >
      > It's hard to find good programmers for C++ projects, because most of
      > the good programmers graduated to languages like Lisp or avoided C++
      > altogether. C++ attracts unimaginative fellows with herd mentality.
      > For creative projects, you want to avoid them like a plague.
      >
      > It is my opinion that all of the above makes C++ a very bad choice for
      > commercial game development.[/color]


      Comment

      • Hendrik Belitz

        #4
        Re: C++ sucks for games

        Neo-LISPer wrote:
        [color=blue]
        > Some senseless stuff[/color]

        Besides your poor trolling attempts (most of your arguments just show that
        you have no knowledge of C++) you don't even tell us what the alternative
        to C++ in game programming could be.

        --
        To get my real email adress, remove the two onkas
        --
        Hendrik Belitz
        - Abort, Retry, Fthagn? -

        Comment

        • JKop

          #5
          Re: C++ sucks for games

          [color=blue]
          > 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=blue]
          > Unsurprisingly, there is a very high failure rate among projects using
          > C++ for modern game development.[/color]

          There's a 90% failure rate for lions when hunting. They still eat.

          I would presume that that "very high failure rate" becomes a bit lower when
          you're dealing with proficient C++ programmers.
          [color=blue]
          > 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=blue]
          > 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=blue]
          > 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=blue]
          > 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=blue]
          > 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=blue]
          > 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=blue]
          > 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.

          You could also make the non-const version call the const version, and then
          just do something extra.
          [color=blue]
          > 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=blue]
          > Constructors and smart pointers make it hard to tell cheap operations
          > from expensive ones.[/color]

          Bullshit. Vague bullshit.
          [color=blue]
          > 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=blue]
          > Reference-counting schemes are usually slower than modern garbage
          > collectors and also less general.[/color]

          Which "garbage collector"? "less general" = vague bullshit.
          [color=blue]
          > 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=blue]
          > There are even books on C++
          > patterns, and some C++ experts take pride in being able to execute
          > those patterns with computer-like precision - something a computer
          > should be doing to begin with.[/color]

          There's books on a lot of things.
          [color=blue]
          > C++ programs are slow: even though the compilers are good at
          > micro-optimizing the code, programmers waste their time writing
          > repetitive patterns in C++ and debugging memory corruption instead of
          > looking for better algorithms that are far more important for speed
          > than silly micro-optimizations.[/color]

          Define "programmer s". I myself don't fit into the inuendo of a definition in
          the above.
          [color=blue]
          > It's hard to find good programmers for C++ projects, because most of
          > the good programmers graduated to languages like Lisp or avoided C++
          > altogether. C++ attracts unimaginative fellows with herd mentality.
          > For creative projects, you want to avoid them like a plague.[/color]

          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=blue]
          > It is my opinion that all of the above makes C++ a very bad choice for
          > commercial game development.[/color]

          My opinion differs.


          -JKop

          Comment

          • Mikael Brockman

            #6
            Re: C++ sucks for games

            JKop <NULL@NULL.NULL > writes:
            [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=green]
            > > Unsurprisingly, there is a very high failure rate among projects using
            > > C++ for modern game development.[/color]
            >
            > There's a 90% failure rate for lions when hunting. They still eat.
            >
            > I would presume that that "very high failure rate" becomes a bit lower when
            > you're dealing with proficient C++ programmers.
            >[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=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=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=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=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=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=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.
            >
            > 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=green]
            > > Constructors and smart pointers make it hard to tell cheap operations
            > > from expensive ones.[/color]
            >
            > Bullshit. Vague bullshit.
            >[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=green]
            > > Reference-counting schemes are usually slower than modern garbage
            > > collectors and also less general.[/color]
            >
            > Which "garbage collector"? "less general" = vague bullshit.
            >[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=green]
            > > There are even books on C++
            > > patterns, and some C++ experts take pride in being able to execute
            > > those patterns with computer-like precision - something a computer
            > > should be doing to begin with.[/color]
            >
            > There's books on a lot of things.
            >[color=green]
            > > C++ programs are slow: even though the compilers are good at
            > > micro-optimizing the code, programmers waste their time writing
            > > repetitive patterns in C++ and debugging memory corruption instead of
            > > looking for better algorithms that are far more important for speed
            > > than silly micro-optimizations.[/color]
            >
            > Define "programmer s". I myself don't fit into the inuendo of a definition in
            > the above.
            >[color=green]
            > > It's hard to find good programmers for C++ projects, because most of
            > > the good programmers graduated to languages like Lisp or avoided C++
            > > altogether. C++ attracts unimaginative fellows with herd mentality.
            > > For creative projects, you want to avoid them like a plague.[/color]
            >
            > 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]

            Linux comes to mind.

            Comment

            • JKop

              #7
              Re: C++ sucks for games

              [color=blue][color=green]
              >> Come to think of it, what *wasn't* written in C++?[/color]
              >
              > Linux comes to mind.[/color]


              Really? What was it written in?



              -JKop

              Comment

              • Catalin Pitis

                #8
                Re: C++ sucks for games


                "JKop" <NULL@NULL.NULL > wrote in message
                news:o97fd.4000 0$Z14.14510@new s.indigo.ie...[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?
                >[/color]
                C

                Also MSDOS and MS WIndows were developed in C, as far as I know.

                Catalin


                Comment

                • JKop

                  #9
                  Re: C++ sucks for games

                  Catalin Pitis posted:
                  [color=blue]
                  >
                  > "JKop" <NULL@NULL.NULL > wrote in message
                  > news:o97fd.4000 0$Z14.14510@new s.indigo.ie...[color=green]
                  >>[color=darkred]
                  >>>> Come to think of it, what *wasn't* written in C++?
                  >>>
                  >>> Linux comes to mind.[/color]
                  >>
                  >>
                  >> Really? What was it written in?
                  >>[/color]
                  > C
                  >
                  > Also MSDOS and MS WIndows were developed in C, as far as I know.
                  >
                  > Catalin[/color]



                  HHHHHHaaaaaaaaa aaaaaaaa ha ha haaaaaaaaaaaaaa aaaaaaaaaa

                  HHaaaaaaaaaaaaa aaaa HHHHHAaaaaaaaaa a

                  ha ha ha


                  OOOHhhhhhhhhh, it's too much.


                  Didn't we switch from coal to oil yyeeaarrss ago?


                  -JKop

                  Comment

                  • Catalin Pitis

                    #10
                    Re: C++ sucks for games


                    "JKop" <NULL@NULL.NULL > wrote in message
                    news:Je7fd.4000 4$Z14.14518@new s.indigo.ie...[color=blue]
                    > Catalin Pitis posted:
                    >[color=green]
                    >>
                    >> "JKop" <NULL@NULL.NULL > wrote in message
                    >> news:o97fd.4000 0$Z14.14510@new s.indigo.ie...[color=darkred]
                    >>>
                    >>>>> Come to think of it, what *wasn't* written in C++?
                    >>>>
                    >>>> Linux comes to mind.
                    >>>
                    >>>
                    >>> Really? What was it written in?
                    >>>[/color]
                    >> C
                    >>
                    >> Also MSDOS and MS WIndows were developed in C, as far as I know.
                    >>
                    >> Catalin[/color]
                    >
                    >
                    >
                    > HHHHHHaaaaaaaaa aaaaaaaa ha ha haaaaaaaaaaaaaa aaaaaaaaaa
                    >
                    > HHaaaaaaaaaaaaa aaaa HHHHHAaaaaaaaaa a
                    >
                    > ha ha ha
                    >
                    >
                    > OOOHhhhhhhhhh, it's too much.
                    >
                    >
                    > Didn't we switch from coal to oil yyeeaarrss ago?
                    >
                    >
                    > -JKop[/color]

                    It seems not :D

                    Catalin


                    Comment

                    • Hendrik Belitz

                      #11
                      Re: C++ sucks for games

                      Catalin Pitis wrote:
                      [color=blue]
                      >
                      > "JKop" <NULL@NULL.NULL > wrote in message
                      > news:o97fd.4000 0$Z14.14510@new s.indigo.ie...[color=green]
                      >>[color=darkred]
                      >>>> Come to think of it, what *wasn't* written in C++?
                      >>>
                      >>> Linux comes to mind.[/color]
                      >>
                      >>
                      >> Really? What was it written in?
                      >>[/color]
                      > C
                      >
                      > Also MSDOS and MS WIndows were developed in C, as far as I know.
                      >
                      > Catalin[/color]

                      You're totally correct in this. But most higher-order toolkits are written
                      in C++.

                      BTW: I don't know a single piece of "real" software that was written in LISP
                      (AFAIK even Emacs only uses LISP as an extension and scripting language:
                      Something that is really bad bevhaviour according to the original troll ..
                      eerrh ... poster).

                      I am also awaiting good examples for LISP 3D-Engines, LISP- OS kernels, LISP
                      device drivers, LISP text processors or LISP numerical toolkits. Feel free
                      to copy your whole project source code for these topics to your
                      news-transfer-daemon /dev/null...

                      --
                      To get my real email adress, remove the two onkas
                      --
                      Hendrik Belitz
                      - Abort, Retry, Fthagn? -

                      Comment

                      • Stefan Scholl

                        #12
                        Re: C++ sucks for games

                        On 2004-10-25 15:08:22, JKop wrote:
                        [color=blue]
                        > MS-DOS was written in C++. Window XP was written in C++. Linux was written
                        > in C++.[/color]

                        You're funny! :-)

                        Comment

                        • Christopher Benson-Manica

                          #13
                          Re: C++ sucks for games

                          In comp.lang.c++ JKop <NULL@null.null > wrote:
                          [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][/color]
                          [color=blue]
                          > AKA Retarded mode.
                          > (inspired response to obvious troll)[/color]

                          What part of "Do not feed the trolls" was hard to understand?

                          --
                          Christopher Benson-Manica | I *should* know what I'm talking about - if I
                          ataru(at)cybers pace.org | don't, I need to know. Flames welcome.

                          Comment

                          • cr88192

                            #14
                            Re: C++ sucks for games


                            "Catalin Pitis" <catalin.pitis@ iquestint.com.r enameme> wrote in message
                            news:2u4dcoF24c h55U1@uni-berlin.de...[color=blue]
                            >
                            > "JKop" <NULL@NULL.NULL > wrote in message
                            > news:o97fd.4000 0$Z14.14510@new s.indigo.ie...[color=green]
                            >>[color=darkred]
                            >>>> Come to think of it, what *wasn't* written in C++?
                            >>>
                            >>> Linux comes to mind.[/color]
                            >>
                            >>
                            >> Really? What was it written in?
                            >>[/color]
                            > C
                            >
                            > Also MSDOS and MS WIndows were developed in C, as far as I know.
                            >[/color]
                            afaik dos was assembler...



                            Comment

                            • Phlip

                              #15
                              Re: C++ sucks for games


                              "Neo-LISPer" <neo_lisper@yah oo.com> wrote in message
                              news:87k6tf9ev3 .fsf@yahoo.com. ..[color=blue]
                              > Hey
                              >
                              > Recently, I researched using C++ for game programming and here is what
                              > I found:[/color]

                              As other industries using C++ - even for highly graphical, rich-content
                              physics simulations - report fewer of these problems, the game programming
                              culture itself might be to blame.
                              [color=blue]
                              > C++ game developers spend a lot of their time debugging corrupted
                              > memory. Few, if any, compilers offer completely safe modes.[/color]

                              The alternative, garbage collection, tends to corrupt memory too. Have you
                              heard of a high-availability Visual Basic program?

                              Game programmers need efficient and deterministic garbage collection. If
                              they don't code it themselves, following healthy styles, they will corrupt
                              memory.
                              [color=blue]
                              > Unsurprisingly, there is a very high failure rate among projects using
                              > C++ for modern game development.[/color]

                              That's because there's a high failure rate period, and most games use C++.
                              [color=blue]
                              > You can not even change function definitions while the program is
                              > running and see the effects live (the ultimate debugging tool).[/color]

                              There are those who don't need to debug. The game programming industry has
                              only begun to adopt unit testing in a very few shops.
                              [color=blue]
                              > 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]

                              Test isolation would help that. If objects are decoupled, you can write a
                              test that plays with only one of them.

                              Playing with unit test cases, and adding them very easily, is a great way to
                              preserve all those little experiments, and convert them into constraints.
                              [color=blue]
                              > 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]

                              Then don't use the static type system.
                              [color=blue]
                              > 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]

                              You make that sound like a bad thing. Most programs have two languages
                              (consider the glorious union of VB and SQL). Games need a scripting layer to
                              decouple designing the game play from its engine. Most other applications
                              with an engine use this model, too.
                              [color=blue]
                              > 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]

                              So what? It also makes the Prototype Pattern a pain in the nuts. These
                              issues are not in the domain, they are just implementation alternatives.
                              [color=blue]
                              > 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]

                              So, uh, use the scripting layer?
                              [color=blue]
                              > 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]

                              It sounds like you need to tell us you are less than perfectly adept at C++.
                              Have you used it for games?
                              [color=blue]
                              > 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]

                              That's because you are familiar with Lisp.
                              [color=blue]
                              > Constructors and smart pointers make it hard to tell cheap operations
                              > from expensive ones.[/color]

                              All cheap and expensive operations are impossible to predict and hard to
                              tell apart. Profile.
                              [color=blue]
                              > C++ lacks automatic memory management and so it encourages copying
                              > objects around to make manual memory management manageable.
                              > Reference-counting schemes are usually slower than modern garbage
                              > collectors and also less general.[/color]

                              Prefer pass-by-reference above all other kinds, because its cognitively
                              efficient and usually execution efficient.
                              [color=blue]
                              > 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. There are even books on C++
                              > patterns, and some C++ experts take pride in being able to execute
                              > those patterns with computer-like precision - something a computer
                              > should be doing to begin with.[/color]

                              C++ syntax is somewhat irregular. But it's lack of a 'read_mind' keyword
                              disturbs me most.
                              [color=blue]
                              > C++ programs are slow: even though the compilers are good at
                              > micro-optimizing the code, programmers waste their time writing
                              > repetitive patterns in C++ and debugging memory corruption instead of
                              > looking for better algorithms that are far more important for speed
                              > than silly micro-optimizations.[/color]

                              How could that complaint be specific to C++?
                              [color=blue]
                              > It's hard to find good programmers for C++ projects, because most of
                              > the good programmers graduated to languages like Lisp or avoided C++
                              > altogether. C++ attracts unimaginative fellows with herd mentality.
                              > For creative projects, you want to avoid them like a plague.[/color]

                              That's because educating someone to write low-risk C++ is difficult. Vendors
                              have clogged our markets with low-quality languages that purport to allow
                              inept programmers to write code at a lower risk than C++ provides.

                              Games must have high performance, so C++ is the leading language for now.

                              --
                              Phlip



                              Comment

                              Working...