2005-09-19

 

C++ clunkiness

Here I am coding various things and it suddenly struck me: C++ is pretty clunky. Now, I knew this to some extent for quite a time already, but the more I code C++ the more clunky it feels.

I admire it as a low-level language; it's very powerful and there's lots of unbelievable things you can do with it (think templates).

But still, it feels like a low-level one. I really want to code by "next project" (whatever that might be) in Lua, for example (especially now that LuaJIT is out).

Comments
YOu don't say what application domain you're going to use LUA for. I hope it isn't a game engine.

I just wasted a couple of years looking at other languages for game development (Lisp, Scheme, Ocaml, Lua, Haskell, Python, C#, Java, Erlang, etc.).

For game development the big problems are (a) all the other languages are at least 5x slower than C++ (no matter what they claim), (b) the only way to make them run fast is to code in a subset of the language that ends up being very similar to C in its expressive power (c) the IDEs for most of the other languages suck, (d) only C++ is widely available on consoles, (e) all the libraries you need are only available in C++ (f) nobody else knows the other languages.

So in the end I decided the theoretical 30% productivity boost from using a different language was going to be offset by the 400% productivity drain for having to mess with a poorer environment and having to spend more time interfacing to libraries and optimizing code...

Now if you're doing a web server or a business application or something, then never mind my advice.
 
I'd target realtime demos mostly, I guess. I'm usually not limited by the GPU (not CPU), so slower language won't be a big deal.

I'd keep the "engine" in C++ that does all low-level stuff, and code the rest in Lua. Well, that's almost how everyone already does - most of the game have a scripting language of some sort, for example.

The biggest drawback of another language to me seems the lack of good IDE/debugger.

Afterall, all this will/would be my freetime project, so I'm free to do whatever I want :)
 
Post a Comment

<< Home