Thread: How rude!!

  1. #16
    Administrator webmaster's Avatar
    Join Date
    Aug 2001
    Posts
    1,012
    Quote Originally Posted by brewbuck View Post
    Destructors, assignment operators, and copy constructors arise from the most fundamental container types. Higher level types should almost never need any of these three types of functions. The only time I find myself writing one of the evil triad is if I'm creating a new fundamental container.
    I find that I rarely write code in a dtor, unless I'm explicitly taking advantage of RAII (or executing "clean up" code that doesn't specifically deallocate resources), but do you really mean that you use the auto-generated assignment operator and copy ctor? Or that you prohibit their use and avoid copying? Do you hold all of your pointers in reference-counted smart pointers?

  2. #17
    "Why use dynamic memory?"
    Join Date
    Aug 2006
    Posts
    186
    The book is huge so i dont wanna go quote hunting, but the author is persistent on using C and the context as far as i remember is something like "Do it in C++ so you practice OOP"

    who does he not write the whole book in C++ ??

    The irony of it is that in the end of the book he talks a little about C++ and recommends a book by one his friends
    "C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg."-Bjarne Stroustrup
    Nearing the end of finishing my 2D card game! I have to work on its 'manifesto' though <_<

  3. #18
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    So you think a better advise was not to mention C++ at all? Or to put it in another way, you don't think a C programmer would benefit from knowledge in C++? I can't think of a more powerful combo. It's a match made in heaven.

    But hey, don't let the possibility of becoming a great programmer get in the way of your faith.
    Last edited by Mario F.; 03-25-2010 at 08:48 PM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  4. #19
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    Quote Originally Posted by Hussain Hani View Post

    i honestly do not know if he is reflecting the main game industry in his code or not, but at one point in the book he says something like:
    "Try rewriting this game using classes......"

    how rude!
    You know what else is rude? Quote mining.

  5. #20
    "Why use dynamic memory?"
    Join Date
    Aug 2006
    Posts
    186
    Quote Originally Posted by Mario F. View Post
    So you think a better advise was not to mention C++ at all? Or to put it in another way, you don't think a C programmer would benefit from knowledge in C++? I can't think of a more powerful combo. It's a match made in heaven.

    But hey, don't let the possibility of becoming a great programmer get in the way of your faith.
    that is not my point, my point is why not use C++ straight up ?

    Update: in one point in the book, while explaininig trees, he said something like: "it is a good practice to nullify the 'next' point once the holder object is created. This could be accomplished by using classes and doing that in the constructor"

    !!!!!

    Again: Just use C++ for Bjarne's sake!!
    "C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg."-Bjarne Stroustrup
    Nearing the end of finishing my 2D card game! I have to work on its 'manifesto' though <_<

  6. #21
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    I think this is something you need to discuss with the author. The way you convey the text makes it sound like he's being antagonistic: suggesting the reader do things they're not expected to know. I'd like to believe that's not the case, so chances are you're missing something only either the writer or someone who's actually read the book can explain.

  7. #22
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by Hussain Hani View Post
    that is not my point, my point is why not use C++ straight up ?

    Update: in one point in the book, while explaininig trees, he said something like: "it is a good practice to nullify the 'next' point once the holder object is created. This could be accomplished by using classes and doing that in the constructor"
    But that's good knowledge, Hussain. You gained knowledge of the construct particulars in C and was also given the equivalent in C++. You win.

    Look, what I'm trying to transmit is that it really needs to be debunked this general notion that there is anything in a programming language that should be the subject of a Following. A programming language is only a tool. It's nothing more. It's a sad little pathetic tool and you've got the power over it. Not the other way around. Just use it as such and do your whole best to avoid falling prey to all the zealotry surrounding programming languages.

    And since you are reading about games, I'll give you a surprising example:

    I mentioned this game briefly on another thread on an entirely different context, but have you heard of Solium Infernum? It's a strategy game for up to six players in the best tradition of board games. It's an indie game. It's also a genial game, so well devised I'm still at awe. It's brilliant in the way it gives players a nearly unlimited level of strategic thinking. It's the best strategy game I've played in a decade. You can tell I like it. You may not like it. It's irrelevant mine and your position. What is relevant is that many people like it, I have no shortage of fellow players to pitch my mind against 4 months after release and the author is pleased with the sales. And there no indication anyone will get bored of it soon. At 30 USD, it already payed itself numerous times. Also the artwork is amazing and there's plenty of well written flavor text for every infernal legion, artifact and relic to entertain yourself. The game is here.

    Do you know what tool was used to develop this game? Macromedia Director.

    I suggest you take a breath, flip the switch in your brain that is telling you to read this book as a bible to C and instead try to understand what the author is doing is giving you knowledge. The little I know of that book (I confess never have reading it) and what I do know from the author, tells me you will gain a lot more from doing this. If you can't do it, or still insist this is rude of the author to do, I suggest you choose another profession. Civil construction is well payed (better than programming these days) and you will never defend framing hammers are better than claw hammers.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  8. #23
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,743
    Quote Originally Posted by Mario F. View Post
    What's the context of that quote?
    "As your next assignment in section 3.4.2, try rewriting this game using classes..."

    My Website

    "Circular logic is good because it is."

  9. #24
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    I wouldn't stop my research into game programming after reading a Lamothe book. I find the writing immature, code examples insufficient, oversimplified, or just plain wrong. There are several good books out there about game programming that will teach you much better object oriented habits and design concepts.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OT:Sorry for my rude behavior
    By moussa in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 06-03-2008, 06:20 AM
  2. Is it considered rude...
    By SlyMaelstrom in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 11-17-2005, 11:42 AM
  3. Enough with rude ppl!
    By SAMSAM in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 03-26-2003, 08:41 PM
  4. Are we too rude?
    By ober in forum A Brief History of Cprogramming.com
    Replies: 42
    Last Post: 03-04-2003, 08:01 PM