Jump to content

  • Log In with Google      Sign In   
  • Create Account


What makes C++ so powerful?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
148 replies to this topic

#1 Zyndrof   Members   -  Reputation: 163

Posted 09 May 2006 - 04:00 AM

I've been having this question in my mind for a while now and thought I should ask. C++ was created in the 80's and still it is one of the most popular languages for creating software. How come there haven't been any language to surpass C++ in these 26 years? And what makes C++ one of the most powerful languages out there? Is there any language that can compare with C++?

Sponsor:

#2 Alpha_ProgDes   Crossbones+   -  Reputation: 4688

Posted 09 May 2006 - 04:06 AM

Legacy. And because of that legacy, money.

#3 TheTroll   Members   -  Reputation: 882

Posted 09 May 2006 - 04:06 AM

Flexablity and direct access to memory.

theTroll

#4 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Posted 09 May 2006 - 04:06 AM

Quote:
Original post by Zyndrof
C++ was created in the 80's and still it is one of the most popular languages for creating software.


You mean "popular in games" only, right? No sane person would think of getting close to C++ for doing regular applications these days, and that's 99% of what is done in IT.







#5 Zyndrof   Members   -  Reputation: 163

Posted 09 May 2006 - 04:10 AM

Quote:
Original post by Anonymous Poster
You mean "popular in games" only, right? No sane person would think of getting close to C++ for doing regular applications these days, and that's 99% of what is done in IT.


I don't know, you're the experts :P Then for regular applications, what is the most popular?

#6 TheTroll   Members   -  Reputation: 882

Posted 09 May 2006 - 04:11 AM

All the jobs that I have worked on reciently are still C++, these are not legacy project but new projects. C++ is not just a legacy language.

theTroll

#7 swordfish   Members   -  Reputation: 276

Posted 09 May 2006 - 04:12 AM

What makes C++ so powerful?

The first thing that comes to my mind is object orientation.
The 2nd thing is templates.
The third thing is that it's based on C and uses familiar syntax and conventions.

How come there haven't been any language to surpass C++?

This all depends on your perspective. Some would say Java surpasses C++.
As far as prototyping is concerned, I think ObjC/ObjC++ surpasses C/C++ - but that's just my opinion.

You have to think too, that C/C++ has become a sort of unified language of the world - sort of like math. Overall, I think it would have to fall down to C++ being so familiar to everybody.

..It just makes sense.

#8 Zyndrof   Members   -  Reputation: 163

Posted 09 May 2006 - 04:15 AM

If it is most popular only for games, is there any language that can manage to do the same stuff as "easy" (or easier) than C++?

#9 Alpha_ProgDes   Crossbones+   -  Reputation: 4688

Posted 09 May 2006 - 04:16 AM

Quote:
Original post by Zyndrof
If it is most popular only for games, is there any language that can manage to do the same stuff as "easy" (or easier) than C++?

Every other language ?!

I'm sorry if I didn't see your sarcasm tags...



#10 Zyndrof   Members   -  Reputation: 163

Posted 09 May 2006 - 04:21 AM

Quote:
Original post by Alpha_ProgDes
Every other language ?!

I'm sorry if I didn't see your sarcasm tags...


Then, what is the point with C++? :/

#11 ronkfist   Members   -  Reputation: 100

Posted 09 May 2006 - 04:23 AM

Well C/C++ is powerfull because it's compiled to native code. In the 80's this was important because pc's werent as powerfull as they are today.

Today pc's are much more powerfull so higher level languages are gaining terrain, because they run at a decent speed and they are much easier to devellop in.

But then again, most of these higher level languages are built using C/C++ :)

#12 escudo825   Members   -  Reputation: 128

Posted 09 May 2006 - 04:24 AM

well I'll just throw an example out since no one else is.

I've used VB (visual basic) before, and though MFC may be similar, I couldn't figure it out on my own. but with VB I sat down with VB6 and had my own calculator built within a couple of day's. without any extra help, and I made my first game with it. though I would recommend VB for general applications since it is really easy to build windowed apps, and I would suggest it to start game programming, I have found c++ much easier and versitile. and I also find working c++ code easer to read then many of the things VB allows.

#13 Zyndrof   Members   -  Reputation: 163

Posted 09 May 2006 - 04:27 AM

Quote:
Original post by escudo825
well I'll just throw an example out since no one else is.

I've used VB (visual basic) before, and though MFC may be similar, I couldn't figure it out on my own. but with VB I sat down with VB6 and had my own calculator built within a couple of day's. without any extra help, and I made my first game with it. though I would recommend VB for general applications since it is really easy to build windowed apps, and I would suggest it to start game programming, I have found c++ much easier and versitile. and I also find working c++ code easer to read then many of the things VB allows.


Your point is that one should start with VB, but C++ code is easier to understand? :P I may have understood you wrong.

#14 JWalsh   Moderators   -  Reputation: 463

Posted 09 May 2006 - 04:30 AM

Zyndrof,

What makes C/C++ so powerful:

Its an "operating system" language. C was originally designed by K&R to implement native code for the UNIX operating system. As a result, it is as "low level" as you can get while still being considered a "high level" language. The ability to inline assembly for speed, the direct acess to memory by using pointers, and the stongly typed nature of the language means that it maps relatively close to the hardware in its functionality - giving it increased performance.

C is also portable. Although not as portable as the more modern languages, C was considered highly portable in its early years. The ability to write the code once, and then compile it on any platform that had a C compiler made it easy to move between windows and unix.

Also, the flexibiltiy and ease of use makes the language suitable for all types of applications. Database, networking, physics, mathematics, games, GUI Interface, even web servers.

Additionally, C++ is object oriented and shares a compatible syntax. The ability to use inheritence, virtual functions, polymorphism, etc..make it relatively dynamic. Additionally, the concepts of encapsulation and data hiding are relatively well done in C++.

Finally, C++ has been used for about 25 years now, meaning that there is a large library of available code for use. This helps to self-perpetuate the language. The more people use it, the more people need to use it in order to be "mainstream."

With all of that being said, C++ is not the "best language" for all things. If you want to write console games, networking application, or kernel level applications that need good performance, C++ is the way to go.

But if you want to write cellular games/applications or web applications, Java has proven to be the dominant and best suited language for these purposes.

As well, C# is gaining ground fast and is already becoming the favorite language for GUI development using the .NET framework. In the end, its just about using the write tool for the job. C++ just happens to be "reasonably" good at all jobs, while not being "excellent" for any...except writing games and operating systems, perhaps.

Cheers!
Jeromy Walsh
Sr. Tools & Engine Programmer | Software Engineer
Microsoft Windows Phone Team
Chronicles of Elyria (An In-development MMORPG)
GameDevelopedia.com - Blog & Tutorials
GDNet Mentoring: XNA Workshop | C# Workshop | C++ Workshop
"The question is not how far, the question is do you possess the constitution, the depth of faith, to go as far as is needed?" - Il Duche, Boondock Saints

#15 Spoonbender   Members   -  Reputation: 1254

Posted 09 May 2006 - 04:32 AM

Quote:
Original post by Zyndrof
I've been having this question in my mind for a while now and thought I should ask.
C++ was created in the 80's and still it is one of the most popular languages for creating software. How come there haven't been any language to surpass C++ in these 26 years? And what makes C++ one of the most powerful languages out there? Is there any language that can compare with C++?

C++ isn't more "powerful" than other languages, except for one fairly irrelevant thing. It's easier to get it to work with really low-level code (ASM, for example) than with most high level languages.

But hardly anyone ever needs that, so let's disregard that for the moment.
In all other respects, it's no more powerful than other languages.

Quote:

Then, what is the point with C++? :/

Legacy. It's widely used and widely supported. Nothing else.

#16 Emmanuel Deloget   Members   -  Reputation: 1381

Posted 09 May 2006 - 04:33 AM

Quote:
Original post by Anonymous Poster
Quote:
Original post by Zyndrof
C++ was created in the 80's and still it is one of the most popular languages for creating software.

You mean "popular in games" only, right? No sane person would think of getting close to C++ for doing regular applications these days, and that's 99% of what is done in IT.

I... Er... What? Popular in games? My gosh! From my experience, games programmer are late adopters of C++ - not their fault, they had to wait for sufficiently good compilers in order to be able to create these wonderfull games. But do you really believe that only a tiny 1% of the IT industry is using C++? I ask this because not everyone agree, you know. Of course, you might be right and they might be wrong. But the DDJ is known to be very partial, and you are not, right?

#17 TheTroll   Members   -  Reputation: 882

Posted 09 May 2006 - 04:35 AM

Spoonbender, I have to disagree with you there, having direct control over memory and the use of pointers gives C++ a huge advantage over other languages. You might not use this but a lot of us do.

theTrol

#18 tstrimple   Prime Members   -  Reputation: 1718

Posted 09 May 2006 - 04:36 AM

Quote:
Original post by Zyndrof
Quote:
Original post by escudo825
well I'll just throw an example out since no one else is.

I've used VB (visual basic) before, and though MFC may be similar, I couldn't figure it out on my own. but with VB I sat down with VB6 and had my own calculator built within a couple of day's. without any extra help, and I made my first game with it. though I would recommend VB for general applications since it is really easy to build windowed apps, and I would suggest it to start game programming, I have found c++ much easier and versitile. and I also find working c++ code easer to read then many of the things VB allows.


Your point is that one should start with VB, but C++ code is easier to understand? :P I may have understood you wrong.


VB provides a WYSIWYG editor which makes it easier for people to jump right in and see results.

#19 JWalsh   Moderators   -  Reputation: 463

Posted 09 May 2006 - 04:37 AM

Quote:

VB provides a WYSIWYG editor which makes it easier for people to jump right in and see results.

So does C++ and C#.

Cheers!
Jeromy Walsh
Sr. Tools & Engine Programmer | Software Engineer
Microsoft Windows Phone Team
Chronicles of Elyria (An In-development MMORPG)
GameDevelopedia.com - Blog & Tutorials
GDNet Mentoring: XNA Workshop | C# Workshop | C++ Workshop
"The question is not how far, the question is do you possess the constitution, the depth of faith, to go as far as is needed?" - Il Duche, Boondock Saints

#20 superpig   Staff Emeritus   -  Reputation: 1825

Posted 09 May 2006 - 04:47 AM

A language is just a tool. C++ is like a leatherman or swiss army knife; it's fairly well suited to a lot of situations. In some situations, though, there are more appropriate tools; for example, you'd probably be better off writing a text adventure game in a language like INFORM, while the Erlang language was designed to power telephone switchboards. In some cases C++ really isn't useful at all - writing vertex and pixel shaders, for example. It's also not the only 'general-purpose' language around; one alternative would be something like Python, and to my knowledge it's not susceptible to things like uninitialized variable bugs.

A lot of people use C++ when there are more appropriate tools available simply because they feel happier sticking with what they know than with learning something new.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS