Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: matth@bellatlantic.net (Matthew Hulett) Newsgroups: scea.yaroze.freetalk Subject: Re: C versus C++ Date: Sun, 18 Jan 1998 14:50:16 GMT Organization: SCEA News Server Lines: 61 Message-ID: <34c20b9a.32261515@news.scea.sony.com> References: <34b54e3d.9156136@news.scea.sony.com> <34C1C44D.D95D81D8@smartt.com> NNTP-Posting-Host: client-119-125.bellatlantic.net X-Newsreader: Forte Free Agent 1.11/32.235 Hello, Awe, debates are fun when you don't hit below the belt... Thanks for you reply. It has become clear to me that C++ is a language well worth learning, which was my original inquiry. On the other hand, it is also obvious that in my position, my best path is to get C down pat, work a whole lot with the yaroze, and then come back to C++ in the future after I've got the libgs, libraries in my head along with gaming algorithms, utilizing graphics and sound applications, etc... There is just so much for the beginner to learn! I'll be back to C++, after studying and learning a minimum of 5000 more pages of games related information. That's a low estimate too... I will check out that newsgroup, thanks everyone for clarifying the issue to me. I wondered for months why some programmers would choose to stay with C when a new, 'improved' version of the language was available, while others would sing it's praises and claim that those who shunned it were 'blissfully ignorant'. Now I know that there are overhead issues, type-of-game issues, time constraint issues, working-as-a-team-with-different-modules issues, etc... Thanks. Cheers, Matt >Hi Matt. As promised I am taking a look at this thread, and I'll tell you >right off the bat that I won't touch a C vs. C++ argument. For volumous >information on this debate I'll refer you to the rec.games.programmer >newsgroup where you'll find numerous threads discussing just this topic. >You'll find that there is no easy answer. > >Once again, I'm not interested in getting into a debate, but instead I'll >tell you why I choose to program my games in C++ rather than C: > >1) C++ provides a framework oriented towards object oriented programming. >It makes it easier for me to write my programs in an object oriented >manner, as my thinking process maps better to OOP than other methods. >Since the much of the new C++ syntax allows me to more simply express OOP >practices than C, I choose to use C++. > >2) In my practical experience (I have shipped 12 commercial games and >tools in my career), and based on data provided by profiling tools, if you >are an experienced coder and optimiser there is no practical difference in >the speed of code generated from C or C++. Since, to use an old addage, 1% >of your code gets run 99% of the time, it is worth it to me to not deal >with my percieved inadequacy of the C syntax to speed up things such as UI >code. In time critical code I am not usually making function calls or >dereferencing non-local variables, so the code generated by C or C++ is >virtually identical where it counts. > >3) Noting the above, C++ was designed not just as a C with classes, but >also as a "better" C in the fact that it has features to protect from some >common errors made by C programmers. For quality critical software that >must be shipped to the market, any features which help avoid errors are >nice. > >So there you go. I hope this helps you! > >-Chris Blackwell > >