I've been contemplating this, too. C++ was my main language for a long time (~1999-2007) and about 30% of my consulting work is still in C++ (game development). I've found that while C++ code can be very clean and concise, it usually requires a lot of behind the scenes scaffolding, and it's very easy to get wrong even if you know the damn thing inside out. Programming in more expressive languages has certainly improv…
Same here, except that after using C and C++ for over a decade I find switching to another language quite trying. The habit of constantly thinking what machine code is generated from the higher language constructs is really hard to ignore. Moreover, I actually like C. But it is inconvenient. On the other hand C++ is convenient, but I don't like it. So I started playing with developing a dialect of C that adds support…
Ask HN: If C++ is so bad, what should game developers use?
121–127 of 127 posts
Re: Ask HN: If C++ is so bad, what should game developers use?
#122Earlier quoted context omitted.
Sorry, but people use the term this way: http://www.google.com/search?hl=en&client=firefox-a&...
A quick read of this page and its top link strongly suggest that runtime type inference is an optimization designed to speed up the interpretation of dynamically typed programs. It sounds very useful for JIT compilation (to make appropriate code specializations). It's also likely too complex to be implemented in simple interpreters (like Lua's). Note that this term isn't very widely used: we are already in second pos…
"Runtime type checking" is the same thing at runtime. Errors and exceptions get thrown, your program stops. So no, that's not what we're talking about.
Here is a description of type checking: http://en.wikipedia.org/wiki/Type_system#Type_checking
Re: Ask HN: If C++ is so bad, what should game developers use?
#123Earlier quoted context omitted.
I was mostly referring to the language. The standard library that comes with Java is over-engineered to the point of absurdity
Not _quite_ to the point of absurdity. I kinda like it. Admittedly, I dislike it when I have to instantiate four classes to read the contents of a file. But I have also used the same flexibility to great advantage, and been burned in other languages when the standard library wasn't flexible enough.
Re: Ask HN: If C++ is so bad, what should game developers use?
#124C++ is fine when you need high performance and can live with more expensive development.
Re: Ask HN: If C++ is so bad, what should game developers use?
#125Earlier quoted context omitted.
Same here, except that after using C and C++ for over a decade I find switching to another language quite trying. The habit of constantly thinking what machine code is generated from the higher language constructs is really hard to ignore. Moreover, I actually like C. But it is inconvenient. On the other hand C++ is convenient, but I don't like it. So I started playing with developing a dialect of C that adds support…
I had the problem of worrying about low-level nuts and bolts for a while too; I guess it must have been the jarring difference in expressiveness between C++ and Lisp that made me stop worrying in the end. I don't think you can realistically wean yourself from C++'s mind pollution gradually - you have to go cold turkey and go with a high level language, dynamic typing, garbage collection, not especially object oriente…
I want it because it is an interesting project in itself. But I hear what you are saying.
Re: Ask HN: If C++ is so bad, what should game developers use?
#126You're right, C++ pretty much has no serious alternatives for games. And not just games, anything that involves computer graphics, physical simulation, computer vision or image processing. Python is excellent if some good soul has already written a library that does exactly what you need (in C or C++, obviously). The combination of numpy+PyOpenGL+PyCUDA is great for certain kinds of research projects (I have written…
Re: Ask HN: If C++ is so bad, what should game developers use?
#127Earlier quoted context omitted.
Last you heard must have been a while ago. Even the engines aren't being written in assembly. Writing in x86 yields slower and less optimized code than letting gcc -o3 etc compile your C code in x86. It simply gets too complex to manage in assembly.
offtopic: gcc -Os is probably even faster than -O3.