What makes C++ so powerful?

Started by
147 comments, last by CoffeeMug 17 years, 11 months ago
I'll add some answers as of why it's powerful:

1) It's a middle-level language, meaning it has the best of high-level languages with the control and flexibility of assembly language. New languages are judge with C++. Most algorithms & examples (even DirectX) will be written in C++ code.

2) It is portable, but not in a platform sense as Java. This just means that assembly language is not portable from machine to machine, but using C/C++ as a layer above makes programming in it portable.

3) It has been used for numerous things, such as operating systems, interpreters, file utilities, device drivers, performance enhancers, etc.

4) It's a general language, meaning it's not tied to a commercial company such as Sun or Microsoft. If anyone owns it, I'd have to say ANSI/ISO.

5) For GUI development, there are third-party Windows APIs that are similar to C#'s syntax which indeed do the same work: access the Win32 API. Several companies use these for their GUI work. Visual Studio 2005 also has the C++/CLI which is full C++ with a C# syntax feel. It also has a full WYSIWYG editor!

SmartWin++: http://smartwin.sourceforge.net/
Gtkmm: http://gtkmm.sourceforge.net/
V GUI C++: http://www.objectcentral.com/
Qt: http://www.trolltech.com/

Why I use it more and more these days is because it can build operating systems to the most complex 3d games to date. I don't think any other language can claim this.

[Edited by - nullsmind on May 9, 2006 3:48:23 PM]
Advertisement
Quote:Original post by nullsmind
1) It's a middle-level language, meaning it has the best of high-level languages with the control and flexibility of assembly language. New languages are judge with C++. Most algorithms & examples (even DirectX) will be written in C++ code.

So, basically, because "everyone's using it," it's great?

Quote:2) It is portable, but not in a platform sense as Java. This just means that assembly language is not portable from machine to machine, but using C/C++ as a layer above makes programming in it portable.

Actually, contemporary C++ isn't very portable at all. Once you move beyond simple console I/O, you need complicated abstraction libraries to make the differences in platforms transparent to your code, and sometimes those differences are so ingrained that the library exhibits different behaviors on different platforms.

Quote:3) It has been used for numerous things, such as operating systems, interpreters, file utilities, device drivers, performance enhancers, etc.

So has damn near every other language on earth.

Quote:4) It's a general language, meaning it's not tied to a commercial company such as Sun or Microsoft. If anyone owns it, I'd have to say ANSI/ISO.

JavaScript is simply Netscape's branded version of ECMAScript (ActionScript is Macromedia's, LiveScript is Adobe's). C# is both an ISO and ECMA standard. The list goes on.



The vast majority of people stating "strengths" of C++ in this thread seem to be under-informed. Grain of salt, yadda yadda.
Oluseyi, I'm suprised you're still here after all these years, and that you still have time to chat with us beginners! Half the time I see you quoting noobs and attack them. Maybe you should open a new board section called Rants. You'd fit perfect there :) Please get a life outside of this sometime. The real world may benefit from your knowledge, but not your social side. Maybe that's why you have time here.
Quote:Original post by nullsmind
Oluseyi, I'm suprised you're still here after all these years, and that you still have time to chat with us beginners! Half the time I see you quoting noobs and attack them. Maybe you should open a new board section called Rants. You'd fit perfect there :) Please get a life outside of this sometime. The real world may benefit from your knowledge, but not your social side. Maybe that's why you have time here.


all he did was point out that you and many others here are misinformed programming language fanboys. i couldn't agree more with the following:
Quote:
The vast majority of people stating "strengths" of C++ in this thread seem to be under-informed. Grain of salt, yadda yadda.
This space for rent.
Quote:Original post by Oberon_Command
Quote:Original post by Spoonbender
If you really disagree with me, then show me a program in C++ that couldn't have been made using C#.


An operating system? You would need a C# compiler that compiles to native binary, and to the best of my knowledge there aren't any...


Well, Microsoft is supposedly writing an operating system in C# as a research project called singularity so it is possible http://en.wikipedia.org/wiki/Singularity_(operating_system).

Anyway to the OP: Don't restrict yourself to just C++ just because "everyone uses it". Try out different languages too, or even a completely different type of language like a functional language. It can only be beneficial to you the more languages you know and once you know one language, it's pretty simple to learn other languages. Since you're just starting out, I suggest you stick with one language at the beginning but to focus more on algorithms and general programming practices. These are the more important skills rather than knowing a programming language. Knowing a scripting language also helps because the trend in game programming is to only program the engine in C++ and use a scripting language to handle AI, actions etc.
I agree with him partially but his response reminds me of an unsocial brat. I'm not suprised his sad life is wasted here on a daily basis. Anyway, I'm thankful that I don't have to deal with it any longer due to a new focus that's more realistic in the real world. I'm sorry that the rest of you have to deal with Oluseyi.
Quote:Original post by nullsmind
Oluseyi, I'm suprised you're still here after all these years, and that you still have time to chat with us beginners! Half the time I see you quoting noobs and attack them. Maybe you should open a new board section called Rants. You'd fit perfect there :) Please get a life outside of this sometime. The real world may benefit from your knowledge, but not your social side. Maybe that's why you have time here.


I didn't see him attacking anyone... could you point out an example, please?

Maybe when I get my own OS working, I'll write a C# compiler for it so I can learn how to write C-like language compilers.
There is no powerful, almighty, uber super programming language that has smashing advantages over the others BUT there is the concept of "chosing the most suitable language for the project requirements."

And one more thing to add, the power of the language depends on how efficiently you are using it.

And as a final thought, I found C++ very powerful for game development. Not just because of the features of the language but also the gaming community around it makes me think like that.

;)

Have we sent the "Don't shoot, we're pathetic" transmission yet?
C++ is an amazing language, unlike any other. What really takes the cake, is that it can be an very high level language, WHILE still having the ability to be very low level. This is because, even though most will disagree with what I'm about to say, C++ is an "upperset" of C. They're different languages, but the syntax is the same. The main idea of C, as many have already said, is that it's supposed to be able to compile to a native, low level language, but still be considered a high level language. C++ does this also, except it incorporates many other things, such as OOP, templates, error handling, etc...

For the one's that like a list:
-Powerful
-Light
-Built in library
-Templates
-Error Handling
-Functions
-Classes
-Library extentions
-Operator Overloading
-Function Overloading
-Memory Management
-Low-level Native Compiled Code
-etc...

Use it, it'll rock your socks off!
We should do this the Microsoft way: "WAHOOOO!!! IT COMPILES! SHIP IT!"
Can we please stop trying to alternately bash and praise every damn PL ever invented? NO ONE is going to win any argument made. After reading posts in this forum for several months, I have been amazed at the amount of posts that go like this:

>X is awesome because (...)
>No, X sucks. Y is way better.
>Actually, X is superior to Y...

Pedantic.
And to be fair, I am also appalled that I got involved in one of those and found myself arguing. *shudder* But I will not do it again. Arguing over programming languages is like arguing about why Spanish or Latin is better than English because you don't have to specify the subject in every sentence or can use declensions. Ridiculous. Ever hear of the term "Turing complete"? Hobnobbing over all of the details of your favorite language is futile. Which is why many of the authors of programming languages never really get into such discussions. Every language sucks. Until the computer can read your mind and do what you want in less than a nanosecond, programming languages will all have drawbacks. Picking on them because they can't do certain things is like picking on some kid just because he wears glasses.
______________________________Stranger things have happened...The Following Sentence is True. The Above Sentence is False.

This topic is closed to new replies.

Advertisement