Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ is still the best choice

Name: Anonymous 2012-01-14 1:10

Are most criticisms of C++ thinly veiled, "it's too hard for me" excuses? All my profs speak highly of C++ and emphasize the importance of learning it to make high performance applications. Stack Overflow seems to like it as well.

Why does 4chan hate it so?

Name: Anonymous 2012-01-15 3:45

>>31
Informative post. Perhaps you can give me some guidance. I'm OP, by the way. I would like to write various tools to automate various professional tasks. For this, I agree that a scripting language is optimal.

But I also would eventually want (possibly need) to make simulations. For this, I've always been told that C++ was the way to go. Some programming boards I've been lurking pretty much make fun of Java/C# for being bloated. To what extent is this true? I've also been told that C++ is the most powerful language out there.

Should I just ditch C++ and go for Java and C? Are there any others you would recommend instead?

Name: Anonymous 2012-01-15 4:14

>>32

If you are doing simulations, then you will want to be able to perform calculations as quickly as possible. One thing that is nice about seeples is that you can set up your data structure, and then perform your calculations on it without invoking any new memory allocations. Not only do you avoid using a GC, but you can also avoid heap allocations by allocating your objects on the stack, since they will all have life time no greater than your calculation for each iteration of the simulation. And stack allocation is about as fast as it gets. The only thing better might be fixed locations in a global, static array, but this gets a little complicated if you are going to be using threads, since you'll need to make sure two threads don't use the same memory for their temporary variables. I'm not sure how much of a boost this would yield, or if it would help at all, or if it would be worth the effort. But anywho, in seeples you can do all of this explicitly. If you want things like that in c# or Java, you'll need to depend on an optimizing compiler to avoid using the GC while performing the calculations for each iteration of the simulation. But Java be fast. I've heard that Java with a just in time compiler can be around the same speed as C once you are no longer performing allocations.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List