Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


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

#41 [deleted99599]   Banned   -  Reputation: 100

Posted 09 May 2006 - 08:48 AM

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]

Sponsor:

#42 Oluseyi   Staff Emeritus   -  Reputation: 1678

Posted 09 May 2006 - 09:06 AM

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.

#43 [deleted99599]   Banned   -  Reputation: 100

Posted 09 May 2006 - 09:18 AM

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.

#44 gumpy   Members   -  Reputation: 793

Posted 09 May 2006 - 09:40 AM

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.

#45 Taralieth   Members   -  Reputation: 166

Posted 09 May 2006 - 10:06 AM

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.

#46 [deleted99599]   Banned   -  Reputation: 100

Posted 09 May 2006 - 10:17 AM

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.

#47 Oberon_Command   Crossbones+   -  Reputation: 1974

Posted 09 May 2006 - 10:30 AM

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.

#48 _EpcH_   Members   -  Reputation: 150

Posted 09 May 2006 - 02:38 PM

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.

;)



#49 dbzprogrammer   Members   -  Reputation: 100

Posted 09 May 2006 - 02:45 PM

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!

#50 Photonman   Members   -  Reputation: 174

Posted 09 May 2006 - 03:33 PM

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.

#51 Roboguy   Members   -  Reputation: 794

Posted 09 May 2006 - 04:15 PM

Quote:
Original post by Zyndrof
How come there haven't been any language to surpass C++ in these 26 years?

This implies that popularity == power. This is not true in this case. Common Lisp is much more powerful when it comes to metaprogramming and Erlang is more powerful when it comes to concurrency or distributed programming, for example.

Quote:

And what makes C++ one of the most powerful languages out there?

By my definition of "power" (the easiest to use for the task at hand), it is generally one of the least powerful languages still in fairly common use.

Quote:

Is there any language that can compare with C++?


That depends on the task, but for most tasks, there are quite a few. You just may have never heard of them or used them.

#52 Oluseyi   Staff Emeritus   -  Reputation: 1678

Posted 09 May 2006 - 04:23 PM

Quote:
Original post by nullsmind
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.

Just a little push to help you with your "new focus."

#53 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Posted 09 May 2006 - 04:34 PM

D looks like it might rise in popularity, maybe...

Usually a 'powerful' language, means low level access to the OS.. In other words, you have power over the hardware.

Using that definition C / C++ are very powerful, and Java is a pussy cat ;)

As for the ppl who think that all IT work must be done in managed languages - this is because if you give power tools to children, they're likley to lose a finger or two. Powerful languages are like power tools, managed languages are like safetey scissors.
You can still get everything done with your scissors, it might even be easier most of the time, but you're gonna end up with a lot more crap that you needed (like writing HTML with MS Word).

Everything that managed languages do (garbage collection, safe arrays, etc..) can be done with C++ using classes to encapsulate the behaviour. It's just not there by default, you actually have to make decisions about which objects should be handled with handles, which will be directly deleted, when bounds checking will happen, etc etc, instead of just doing it all for everything.

In short, if get urself a good C++ runtime/static library, theres no need for safety scissors (provided you understand that * and & mean you have direct access to memory, and use them properly, or get a class to handle them for you)...

#54 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Posted 09 May 2006 - 04:39 PM

Quote:
Original post by Anonymous Poster
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.


You, sir, are a moron. This statement is complete fantasy.


Agreed. C++ is used for a very large proportion of 'regular applications'.

Although where I work now, i write tools for the creative department, and we chose to write all our apps in PHP, even though it is literally 400 times slower than C...

#55 Promit   Moderators   -  Reputation: 7671

Posted 09 May 2006 - 06:04 PM

An interesting observation, if I may.

Most of the users extolling the virtues of C++ are fairly new, lower rated users, several of whom I know for a fact are fairly new to programming. The people advocating a more balanced and inclusive viewpoint are higher rated users, several of whom have been on this forum for quite a lot of years.

I don't endeavour to insult anybody here. However, I feel that this is a fundamental insight into the nature of the discussion. If you have never done serious work in a language other than C++, you are not qualified to comment on the strengths and weaknesses of C++, let alone those of other languages. If you have never worked in C# or Java, you have no business talking about the performance of managed languages or garbage collection or JIT or any of it. If you're going to claim a language can't do something, be damned sure to do your research first (a quick search for C# operating system brings up Microsoft's Singularity project).

At the end of the day, I'd caution you all about whose advice you take and how seriously.

#56 Kaze   Members   -  Reputation: 948

Posted 09 May 2006 - 06:43 PM

I am not sure about powerful, but for popular probably because its a very versatile and well rounded language, as stated before there are more powerful languages but they probably aren’t as suitable as c++ for every application.

Also a lot of the interpreted languages require a properly set up framework/JIT/interpreter/whatever and are easy to decompile, this makes commercial application developers a bit squeamish, as they’ll probably be supporting and updating the same app for decades.

Finally of course there is legacy, even if c++ isn’t the simplest or the fastest to develop who cares if I can complete 95% of the programming requirements just by patching together 3rd party libraries.

#57 Fruny   Moderators   -  Reputation: 1653

Posted 09 May 2006 - 06:57 PM

C++ is popular because it is an improvement on C which was widely taught in universities which were running UNIX which had very attractive academic licensing conditions.

This says nothing about the merits of the language itself. People use what they are familiar with. Scientists and engineers still use and learn Fortran, after all.

#58 phantom   Moderators   -  Reputation: 7593

Posted 10 May 2006 - 03:07 AM

Quote:
Original post by Anonymous Poster
D looks like it might rise in popularity, maybe...


The problem with D is that people have been saying for a few years now 'oh it will rise in popularity' and... well, look where it is now?



#59 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Posted 10 May 2006 - 03:28 AM

Quote:
Original post by Anonymous Poster
Quote:
Original post by Anonymous Poster
You, sir, are a moron. This statement is complete fantasy.


Agreed. C++ is used for a very large proportion of 'regular applications'.

Although where I work now, i write tools for the creative department, and we chose to write all our apps in PHP, even though it is literally 400 times slower than C...


Haha, in what planet? C++ is a productivity killer, anyone using either know exactly what it's doing, so they know they need C++ and why, or it's a complete noob that learned how to program last year and think he's the "super programmer" only because he heard C++ is "for th3 l33t".

There are tons of more productive environments for working, and languages that aren't as retarted as C++ for "regular applications" *.

In all these years I am still to meet a single C++ developer. Any of the simpler apps used to be done in VB or Delphi, now many migrated to either Java or C#. In the web the "quick'n dirty" stuff is done either in PHP or Perl or Python (and now Ruby), and more complex stuff that requires more power is usually done in Java.

You must be really a masochist to use C++ outside kernels, device drivers or games. I would like to hear real developers here to say otherwise and why, not unexperienced boys that think that know everything about everything.

* regular applications: forms, apps with database access, web services, web applications and simple stuff like that.


#60 TheTroll   Members   -  Reputation: 882

Posted 10 May 2006 - 03:36 AM

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, and before you you say we didn't know what the other languages could do, we did reverse engineering for VB, Java, C# and C++, so we were quiet well versed in the others. When you are do low level work there is no better langauge. Now with that being said, most of what I do now days is in C#. Programming langauges are just like ethics, they are all situational. What language is the "best" depends on the situation, nothing else.

theTroll




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