What makes C++ so powerful?

Started by
147 comments, last by CoffeeMug 17 years, 11 months ago
Quote:Original post by TheTroll
I worked at a place that we made UML modeling tools, we did all of our programming in C++. I doupt we could have done the same stuff in any other language...
WTF kind of UML modelling tools are you making?
Quote:Original post by dagbud
I would love to see anyone make a game in Java or C# that can compare with a AAA title written in C/C++. Maybe as a proof of concept, or maybe to learn that the language is a tool and some tools are better than others at certain jobs.

-Dagbud


Arena Wars

Anyone using C++ for enterprise server apps? Web apps? How about drivers on Linux*? Anyone?


*trick question, you can't, there's no support for C++ drivers in Linux.

[Formerly "capn_midnight". See some of my projects. Find me on twitter tumblr G+ Github.]

Advertisement
why does everyone hate operator overriding, it no harder to look up what they do then any normal method in a class, = is nicer than .clone() to make a useable copy , and why would anyone need to bit shift or mask a complex class/object
Java IMHO was designed for high level application development, a job it does very well but games seem to not lend themselves well to most "good" oop practices and i usually end up with messy unmodular code that could have been done with much less code in a more flexible environment.
Quote:Original post by DeadXorAlive
What were they intended for in the first place?


Parametric polymorphism but templates do not give true parametric polymorphism (depending on who you talk too). C++ Templates where and are not designed for metaprogramming, that just came about as an accident.

Quote:Original post by Kaze
games seem to not lend themselves well to most "good" oop practices and i usually end up with messy unmodular code that could have been done with much less code in a more flexible environment.


That's most likely your fault, OOP is perfectly capable of describing a game. Also what do you mean, when you say a "more flexible envirornment"? A procedural language like C or C++?

Quote:well, the only thing thats portable is that ascii source code file you wrote

You still need a program to parse the file, even though this program is much simpler than byte-code interpreter, it's still required.
Quote:Original post by Kaze
why does everyone hate operator overriding...

First, it's called overloading, not overriding. The two terms mean different things.

Second, I don't know anybody that hates operator overloading, though I know quite a few that hate C++ operator overloading for the simple reason that it relies on wildly different conventions depending on the nature and usage syntax of the overloaded operator - unary minus (negation) versus binary, for instance. Operator overloading is no different than writing a regular function in Python, for instance: operators are simply given special names like __add__ and __imul__.


Anyway, the nonsense persists, so it's time to bust out the heavy guns!
So you think you know C++ Quiz 1 and commentary
So you think you know C++ Quiz 2 and commentary
[Edit: Fixed links. Forum software mangled the in-page anchors.] [Washu-Edit: #links don't work with journals anyways, fixed again]

I recommend that those of you who haven't seen the quizzes before attempt them before looking at other people's answers, and only then look at the commentary. And then you'll realize that, for all its supposed "power," most people don't know nearly enough C++ to use it safely or effectively. And since power is nothing without control, C++ is really nothing special in their hands.

[Edited by - Washu on May 12, 2006 3:23:50 PM]
Quote:Original post by Oluseyi

Anyway, the nonsense persists, so it's time to bust out the heavy guns!
So you think you know C++ Quiz 1 and commentary
So you think you know C++ Quiz 2 and commentary


Either those links are broken or the site they link to is broken. Some VBScript error or something...

Quote:Original post by CTar
Quote:Original post by Kaze
games seem to not lend themselves well to most "good" oop practices and i usually end up with messy unmodular code that could have been done with much less code in a more flexible environment.

That's most likely your fault, OOP is perfectly capable of describing a game. Also what do you mean, when you say a "more flexible envirornment"? A procedural language like C or C++?

1 mostly that games inherintly have high coupling as you needs most of the main game elements to interact with each other, note that im not saying it cant be done, im just saying it dosent give a lot of benifit and usally requires more code and presents more organization problems
2 yes c++ but i also find .net to be a nice balance of flexibility and organized object driven design


Fixed. It doesn't take #'s for some reason, i blame the dart:

In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.

No, it was some wierdness with the forum software parsing - and subsequently mangling - links that have in-page anchors (ie, "URL#anchor") where the URL ends in an ampersand. Fixed by using good old &.
Your fix failed! You are firod!

C++ is a very hard language to master, even members of the standards body make mistakes with regards to the language from time to time.

In time the project grows, the ignorance of its devs it shows, with many a convoluted function, it plunges into deep compunction, the price of failure is high, Washu's mirth is nigh.

This topic is closed to new replies.

Advertisement