It’s been a long time since I’ve written C++ code. Or C code, for that matter. Like before STL, before g++ really did templates right, before namespaces. I sort of miss the drama of C hacking, but I sure don’t miss all the stupid stuff about C.
A friend of mine wrote a brand new Minecraft map renderer, in C++. It’s really fast. But compiling it was such a mess. g++ 4.4 apparently moved some include files around, so I had to manually include stdint.h in a few places. Why? So you can get an honest-to-goodness 32 bit wide int reliably, since of course C still assumes int is some random width that happens to be the default in that version of the compiler on that kernel. Even with stdint.h included the compiler still couldn’t pick up a macro from inside it. I never could figure out why, I finally just copypastaed the macro into the code. Awesome.
Then there’s linking. What a bizarre thing to have to do with code. The nice thing about linking is you can also link -static, and get a binary that really will run pretty much on any compatible system. Java can do the equivalent reasonably well, but Python is a total nightmare for distributing portable code.
At least I haven’t seen any segmentation faults in the running code yet. Nor buffer overruns. Nor typecast problems. Ah, C, your edges are so sharp!