By using this site, you agree to our Privacy Policy and our Terms of Use. Close

Forums - General - How difficult is C++???

I think everything is right, right?



 

Around the Network
NJ5 said:
supermariogalaxy said:
Yeah, I heard Java wasn't so fun, I heard it's also slower than C++.....But my cousin told me for games, Java has better graphics, is this true???

Yes, most languages are slower than C++. Of the most used languages, the only ones which are faster than C++ are C (or C++ without the object oriented part, which is basically C) and Assembly.


C is not inherently faster then C++. In some compilers, C++ is converted to C before it's compiled. Fortran is faster then C or C++. Because it does not use pointers it's easier for the compiler to optimize the code. It can do a better job of predicting when it needs to fetch something out of memory, and how long to keep values in registers.

It's why a lot of people who do a lot of CPU intensive calculations still use it. (Like blast analysis algorithms that might take 2 days to run)

As to the OP, it’s been said here before, but to reinforce the point… the language is not important. Learning what OOP is, and why you would use it, along with programming algorithms is what you want to focus on. Once you know those things, you’re in good shape. There are dozens of good languages, and based on what you plan on doing, you will be using different ones.

 



TheRealMafoo said:

C is not inherently faster then C++. In some compilers, C++ is converted to C before it's compiled. Fortran is faster then C or C++. Because it does not use pointers it's easier for the compiler to optimize the code. It can do a better job of predicting when it needs to fetch something out of memory, and how long to keep values in registers.

It's why a lot of people who do a lot of CPU intensive calculations still use it. (Like blast analysis algorithms that might take 2 days to run)

As to the OP, it’s been said here before, but to reinforce the point… the language is not important. Learning what OOP is, and why you would use it, along with programming algorithms is what you want to focus on. Once you know those things, you’re in good shape. There are dozens of good languages, and based on what you plan on doing, you will be using different ones.

 


The first part of what you said about Fortran is complete BS.

Fortran is just more tailored for the task you described, that's all there is to it. Most CPU intensive clusters use C code actually, so please, stop spreading nonsense.

I'm surprised because the rest of what you said is actually correct, so how could you contradict yourself in the first part?

Anyway, what's important in programming, is understanding the concepts.  Being a good coder is different from being a good engineer. Asking how difficult is C++ is basically showing a great misunderstanding of what CS is. It's also showing total lack of knowledge about it.

If you didn't start programming at a very young age, it's already too late to be self-taught. CS courses are then mandatory IMHO, to understand even the basis of 3D programming. Programming involves knowing lots of things at more or less high levels, like maths, logic (math's derivative), signal processing, languages (of course), state machines (and all derivatives like automata and neural networks), algorithms, 3D programming and maths, databases, ...

Then, you'll be able to shake your heads and laugh at a lot of people here saying all kind of nonsense about game complexity compared to console power, or about how "hard is a console to program".

You'll actually be able to pick up easily who understand computer science and who doesn't (most people here don't). And no, it has nothing to do with number of polygons/s or fillrate...



TheRealMafoo said:
NJ5 said:
supermariogalaxy said:
Yeah, I heard Java wasn't so fun, I heard it's also slower than C++.....But my cousin told me for games, Java has better graphics, is this true???

Yes, most languages are slower than C++. Of the most used languages, the only ones which are faster than C++ are C (or C++ without the object oriented part, which is basically C) and Assembly.


C is not inherently faster then C++. In some compilers, C++ is converted to C before it's compiled. Fortran is faster then C or C++. Because it does not use pointers it's easier for the compiler to optimize the code. It can do a better job of predicting when it needs to fetch something out of memory, and how long to keep values in registers.

It's why a lot of people who do a lot of CPU intensive calculations still use it. (Like blast analysis algorithms that might take 2 days to run)

As to the OP, it’s been said here before, but to reinforce the point… the language is not important. Learning what OOP is, and why you would use it, along with programming algorithms is what you want to focus on. Once you know those things, you’re in good shape. There are dozens of good languages, and based on what you plan on doing, you will be using different ones.

 


Just because C++ is sometimes converted to C, it doesn't mean it's not slower. After all, all languages can be converted to machine code, and we don't say that they aren't slower than machine code ;) Certain constructs that C++ encourages make it slightly slower than the code most C programmers would write. It's certainly a very small hit considering the benefits though.

But your point still stands though, performance is not one-dimensional.

 



My Mario Kart Wii friend code: 2707-1866-0957

@shams
LISP is actually an implementation of a functional language, and is a direct implementation of Logic (subdomain of maths).
CAML is a also functional language.
I was VERY good at logic, it was one of my favorite courses (with symetric multi processing), and thus, I was also very good at using these languages. There's nothing hardcore in them, they just require using lots of recursive thinking, sometimes in long chains, without losing the thread of what you're doing. Basically, another way of thinking.
I actually loved every kind of language : procedural, functional, object oriented, that's the bulk of what I learned. Only the over engineered ones (my opinion), mostly true Object languages, like Objective C, I couldn't stand: I'm a pragmatist.

Actually, that's some traits of personality that I think make me love some kind of SRPG so much.