When/Why to Move to C++?

Started by
57 comments, last by swiftcoder 12 years, 8 months ago
Kristen Nygaard, another inventor of OO, might not agree that object oriented programming languages has to provide more than [font="sans-serif"]objects, classes, inheritance and virtual quantities. I'm wondering, what do you guys mean by ""[/font][color=#1C2837][size=2] a very precise way of thinking about software"?
Advertisement
It may be a semantic distinction, but that doesn't make it incorrect or somehow invalid. By the original definition, and by many of the subsequent iterations on that vision, Java's structure as a language encourages violation of OO principles. Arguably, the same is true of C# and its property system.

I don't feel like it is sensible to claim Java is OO by virtue of the fact that you can torture the definition of OO to suit Java's whims; it smacks of fallacious reasoning to me. Of course, one could just as well argue that my own chosen definition of OO is somehow faulty, so we really have to boil down to pragmatics to reach a useful conclusion.

By that token: for certain foundational views on Object Orientation, Java fails to pass the acid test of compliance. On the flip side, at the risk of posing a wholly circular argument: Java is OO in the sense of "OO" that Java itself was largely responsible for popularizing.

Reasonable enough? :-)

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]


It may be a semantic distinction, but that doesn't make it incorrect or somehow invalid. By the original definition, and by many of the subsequent iterations on that vision, Java's structure as a language encourages violation of OO principles. Arguably, the same is true of C# and its property system.

I don't feel like it is sensible to claim Java is OO by virtue of the fact that you can torture the definition of OO to suit Java's whims; it smacks of fallacious reasoning to me. Of course, one could just as well argue that my own chosen definition of OO is somehow faulty, so we really have to boil down to pragmatics to reach a useful conclusion.

By that token: for certain foundational views on Object Orientation, Java fails to pass the acid test of compliance. On the flip side, at the risk of posing a wholly circular argument: Java is OO in the sense of "OO" that Java itself was largely responsible for popularizing.

Reasonable enough? :-)


I would have to say yes.

I remember attending some lessons by Nygaard myself and I got the feeling that there was more to he's ideas about OO than just the structures, so to speak. But I couldn't quite figure out what lol.
The closest I got to an answer has been languages claiming to be "true OO" languages, and the justification for that term always seemed to focus on what features those languages didn't provide. Hence, forcing the programmer to do OO the right way.
I'll allow it. ;)


Besides, I feel sullied defending Java (in any regard), a language I really am not keen on.


I would however say that C# is much closer to the original vision of Smalltalk than you are giving it credit for, especially with its emphasis on reflection. In many ways ( except syntax/implementation ) I would regard C# as the closest mass market language to implementing Alan Kay's vision. ((With the possible exception of Objective C, a language I have ( and desire) very little experience with))
This discussion reminds me of the "make an engine or make a game" discussions...

What is the final goal(at least for now)?? What tools can get you to the goal, and which ones fit better??

For example, the software Game Maker(cheesy as the name is) is actually quite capable of making 2d games. It is pretty easy to use, and yet has a scripting language(similar to Javascript, C++ language types), and so allows you do many things that the drag&drop buttons obviously couldn't do. Here's the catch. At the time of this post, the scripting is slow, and the sound system is not that great. But....for some devs it is a better choice than coding a game in C++. Why?? Because you no longer have to code everything. Of course, the more is done for you, the less you can customize. Unity is another example. It requires much more scripting, but for making games, it is still easier than simply using C++(at least in the opinion of some).

For me, I started about 12 years ago using C++, way back with Visual C++ 6.0.(I'm sure others have much longer of a history than I). I've done games with vanilla OpenGL and DInput/DSound. I've also used the Irrlicht engine(pretty nice actually). But, I currently am using Game Maker. Why? The reasons I mention above. I can use C++, and reality is my games would be faster at run-time, but dev-time on the other hand not likely.

The thing to watch is whether the tools can meet the requirements for what you want. For 2D games, Game Maker can do a lot. For 3d games, Unity can also do a lot. There are other tools/toolsets out there, with similar tradeoffs. The Torque3d lineup isn't bad, but it has downfalls too. The final verdict would depend on whether one of the easier to use tools is "good enough," and if it is, you are probably better off using it if your real goal is game creation.



There is no good answer to these questions really, languages are just tools.

Since you've made a few games allready you should have enough programming experience to be able to pick up pretty much any language.

Almost noone "switches" to C++ , an experienced programmer will know and use multiple languages, C++ is a good language to know and it is quite heavily used in many fields but there are plenty of other languages you should take a look at aswell at some point.


yeah ,.. 10 years ago when i started to learn programming, i chose C++ because everyone told me that if u want to do games u need it..
now i only use it for my own hobby projects :-).. in my work i mostly go with Obj C + Java... They provide a lot of useful functions and they are the main language to go for iOS and Android.

But nevertheless.. C++ is my big love and, u can start flaming me now, I would suggest ANY NEWBIE to start with C.. the value of learning memory management and casting and all this low level ish is uncountable.. i got my last job actually only because im a c++ coder... even if i dont use it now .. people know what ive been through lol ^^

I open sourced my C++/iOS OpenGL 2D RPG engine :-)



See my blog: (Tutorials and GameDev)


[size=2]http://howtomakeitin....wordpress.com/


I would suggest ANY NEWBIE to start with C].. the value of learning memory management and casting and all this low level ish is uncountable.. i got my last job actually only because im a c++ coder... even if i dont use it now .. people know what ive been through lol
[/quote]
Non sequitur. I don't see how low level development being useful to you at some point in your career means that one should start there.
I don't know.

When it comes questions like this, I usually reply with "just hack away". IF you are interested enough, then you will have the persistence to figure out how each new language works to some degree. That includes reading up plenty of material on the subject and trying new tricks.

After a while, you cherry pick the one that is more relevant to you in terms of career and interests, and then refine your coding skills with your choices.
Latest project: Sideways Racing on the iPad
Well, I started with C, that was the first I learned and i think that made me a lot easier to understand new languages, althought it took time to me to understand that one. Why to move to C++? Whenever you want. At first I didn't understand oop really good, and couldn't see why that would be usefull, but when I understood them and applied it to game, classes and all these things happened to be much more comfortable and, in my opinion, easy to use, than the things I had to do before. Now when I think about how would I do that in a game, I always think in C++, so I would recommend you to move into C++, but it's not necessary to make games at all. In fact, most libraries are for C, not for C++, (but in C++ you can use them), like SDL, OpenGL, Allegro...
I started with C as well, and while I am glad that I understand how to do my own memory management and the importance of knowing how things are stored in memory, I have to agree with rip-off that it's probably best that a person learning to program not start there. Unfortunately, I did not have much guidance in the realm of what to choose and so learning the language of operating systems seemed like a good place to start. I wish I could do it over again, I think it would have been beneficial to learn high level programming concepts first then learn how each works. Like learning how to drive, you wouldn't bother yourself with how the engine is mounted, how the fuel injection works, what sequence your distributor cap fires in; you would first learn the rules of the road, how to accelerate, braking distance etc. However, I would certainly suggest anyone who has been programming for a little while (2-3 years) at least try C out. If for no other reason then to learn pointers and malloc(). Truly understanding why malloc always returns a void * is lifechanging (at least for an 8th grader with no formal computer education.)

This topic is closed to new replies.

Advertisement