Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why is C++ so big?
#1
Why are there so many people doing c++. I've heard even from c++ coders, that python is better. Is this maybe because c++ has been around longer? What do you think the future of python is? Do you think It will eventually beat out c++?
Reply
#2
Probably not...Languages like C/C++ can do things that languages like Python/Perl/Ruby have problems with...But then languages like Python can do things in one line of code that would take days if not weeks in C/C++, plus there is is the joy factor..Python is a true joy to program in.

To give you an idea how respected languages like C are - Python brags that most of its functionality is created with C...So in some respects Python has C build into it..

I read this somewhere - If you want to write/prototype a program fast then use Python - the parts that need special attention can be modified latter in C/C++(by modified, I mean sped up)

Why are so many people into C++...I really don't know...Check out my posting - why C++ Sucks
Slackware 13/ArchLinux - C/Assem/Python
Reply
#3
Well maybe because the game industry is really big on C/C++/C#? I heard Halo had some C# in it. And most of the people trying to learn C++ (that I know of) want to create their own game or have a future in the game industry. Although C++ isn't always the programming language game companies use, they want to see how you can handle a language like C++.

This is just in my opinion.
Reply
#4
(11-01-2009, 10:16 PM)InsideSin Wrote: Well maybe because the game industry is really big on C/C++/C#? I heard Halo had some C# in it. And most of the people trying to learn C++ (that I know of) want to create their own game or have a future in the game industry. Although C++ isn't always the programming language game companies use, they want to see how you can handle a language like C++.

This is just in my opinion.

If its just your opinion,,,why are you attaching it to the entire gaming industry...
Slackware 13/ArchLinux - C/Assem/Python
Reply
#5
He is correct though, C/C++ is the dominant language for the game industry. Mainly because C/C++ is just so fast relative to other high level languages, and also gives you a great deal of control over the low level workings; for instance, you can (and likely would for a large game) write your own memory pool and override the default new/delete operators to allocate memory from your memory pool, this is usually significantly faster than letting C++ allocate from the "raw" heap. Also there is the fact that all the major console SDKs are written in C/C++ so it is just expected that you will be using it to program with.

Also, you precious Python usually uses a byte-code interpreter implemented using C:
Quote:CPython is the default, most-widely used implementation of the Python programming language. It is written in C.

In short, C/C++ is used because it is fast and powerful. Interpreted languages just cannot match it in terms of that, they do however usually provide libraries and functions that make using said interpreted language easier, which makes rapid development possible. Because of this C#/XNA is a good choice for prototype game development.

To answer your question. No, I don't feel that Python would ever beat out C/C++, because with C there would be no Python. Also AAA game developers are constantly pushing performance and for that they need a performance critical language, interpreted languages just don't fit that bill.
[Image: sig.php]
The little boat gently drifted across the pond exactly the way a bowling ball wouldn't.
Reply
#6
(11-02-2009, 05:58 AM)g4143 Wrote: If its just your opinion,,,why are you attaching it to the entire gaming industry...

I meant it was in my opinion because there may be a different reason the gaming industry looks for C++ users.
Reply
#7
I feel I have to step up and defend the Python like languages out there...

Yes C/C++ are great languages for doing low level work(fantastic actually) but how many times do you find yourself needing to do low level work...I'm guessing not very often...and when that need does occurr how long does it take you to write a few lines of code? Ages and its probably buggy as hell, so there is a place for these *cough cough* interrupted languages even if they are looked down apon by their bigger and powerful bothers....

C/C++ type languages will never die but they are yielding more and more ground to the newer interrupted languages so evenuatlly they will be overtaken...just look at assembler, at one time it was king of the pile
Slackware 13/ArchLinux - C/Assem/Python
Reply
#8
Interrupted == Interpreted?

(11-03-2009, 05:42 PM)g4143 Wrote: Yes C/C++ are great languages for doing low level work(fantastic actually) but ... how long does it take you to write a few lines of code? Ages
No, not really. I guess it depends what you are trying to do, but for the stuff I usually do I can knock up some working code pretty fast.

(11-03-2009, 05:42 PM)g4143 Wrote: and its probably buggy as hell
Once again, no. If any code you produce turns out 'buggy as hell' then maybe (and this isn't aimed at you, it's just a general statement) you need to move away from a language that holds your hand on failure to one that kicks your arse. That should motivate you to fix your errant ways.

(11-03-2009, 05:42 PM)g4143 Wrote: just look at assembler, at one time it was king of the pile
Irrelevant really, but I've heard people could (when the Wii compiler first game out) hand-write better assembly (without really knowing about how the underlying architecture works) than the Wii compiler was able to produce.

I think the main reason I like to use C++ is that I like having direct control over what is happening. I like that I have explicit control over an objects lifetime by new and delete. I like that the language gives you several ways to do various things and you have to pick the best for your situation. I like that you are able to do all kinds of crazy stuff that higher-level languages stop you being able to do. I like pointers. I like the speed. I like the power. And because I like all these things, that's what makes programming in C++ fun for me. You may think me a masochist, but hey, at least I'm enjoying myself. Thumbsup
[Image: sig.php]
The little boat gently drifted across the pond exactly the way a bowling ball wouldn't.
Reply
#9
(11-03-2009, 07:46 PM)MrD. Wrote: Interrupted == Interpreted?
I think the main reason I like to use C++ is that I like having direct control over what is happening.

This is very misinformed - In C++ you have all kinds of abstractions

Objects, function overloading, virtual functions - these are just a few things that are handled by the compiler/linker and not the programmer...

The only language(s) you have complete control over your code is assembler and raw hex.

As for hand writing assembler being faster than C++ you bet it is - compilers today are fantastic but they can't conceive every situation and possibility that's why people still program in assembler to get the smallest and fastest executable.

Actually I started out in C++ and moved into C and assembler because I wanted out of a controlled environment...I wanted to be the one that directly controlled what was going on..
Slackware 13/ArchLinux - C/Assem/Python
Reply
#10
(11-04-2009, 07:56 AM)g4143 Wrote: This is very misinformed - In C++ you have all kinds of abstractions

Really I should have said more direct control.
[Image: sig.php]
The little boat gently drifted across the pond exactly the way a bowling ball wouldn't.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Big problem [ My Project ] :( prince76 10 3,668 02-16-2012, 05:36 AM
Last Post: prince76

Forum Jump:


Users browsing this thread: 1 Guest(s)