Since I am doing this project in my spare time, the hours I put into it must be very productive, if anything is to come of it. That is why I will try to stay away from C++. I simply cannot afford to recompile and restart the game every time I make a tiny little change. The goal is to be able to code for whole days without restarting even once. On the other hand, I am sceptical about programming languages that pretend to be alone in the world and don’t let me use libraries written in other languages.
Add performance requirements and the number of languages I could choose from was pretty small. I considered Python, F#, and some other languages, but the one I settled for was Scheme.
Scheme has many advantages, the biggest one for me being that it can be used both for exploratory incremental programming and be compiled to C or machine code once you have a finished work. There are several mature and reasonably efficient compilers to choose from, and many of them let you interface with C easily.
I chose Chicken Scheme and am very happy with it so far. Right now, the game consists of about 600 lines of (mostly uncommented) Scheme code and 2500 lines of (very sparse and heavily commented) C++. The scene graph and the SVG parser are written in C++, and the rest will be written in Scheme.
Scheme has disadvantages too. It is essentially a write-only language, since it has close to no syntax at all. Standard Scheme also lacks pretty much everything when it comes to common data structures and algorithms, but with Chicken that seems to be less of a problem. Another thing I have come to like and to miss from Scheme is static typing. Catching errors at compile-time saves you so much trouble in the long run.
As the Scheme code grows larger I will probably have to do something about these things. I have experimented a bit with AntLR and it looks easy to write a “preprocessor” or compiler that translates from another syntax to Scheme. That way I could keep the advantages of Scheme while gradually adding static typing and a readable, python-like, syntax. But first of all I want to prove to myself that this project is going somewhere, so growing my own language will have to wait.

