Using code generation in your game.

http://www.paulgraham.com/avg.html

[quote]As long as our hypothetical Blub programmer is looking down the power continuum, he knows he’s looking down. Languages less powerful than Blub are obviously less powerful, because they’re missing some feature he’s used to. But when our hypothetical Blub programmer looks in the other direction, up the power continuum, he doesn’t realize he’s looking up. What he sees are merely weird languages. He probably considers them about equivalent in power to Blub, but with all this other hairy stuff thrown in as well. Blub is good enough for him, because he thinks in Blub.

When we switch to the point of view of a programmer using any of the languages higher up the power continuum, however, we find that he in turn looks down upon Blub. How can you get anything done in Blub? It doesn’t even have y.

By induction, the only programmers in a position to see all the differences in power between the various languages are those who understand the most powerful one. (This is probably what Eric Raymond meant about Lisp making you a better programmer.) You can’t trust the opinions of the others, because of the Blub paradox: they’re satisfied with whatever language they happen to use, because it dictates the way they think about programs.
[/quote]

Lisp’s an object lesson in what happens to great languages that lack great toolchains and ecosystems when combined with a community that denies either is a problem. Clojure’s nice, but it doesn’t really renew Lisp any more than Ruby revolutionized Smalltalk.

Anyway, my favorite response to Paul Graham, probably one of the best put-downs in blog history: http://www.idlewords.com/2005/04/dabblers_and_blowhards.htm

I see this has popped up again. Some good discussion here. I was using my Message set up as an example to ask about compile time code generation. Don’t get too hung up on the particulars of this specific example and whether it is worth doing; it’s of more interest for everyone to discuss it in general.

I am aware that LISP can do this but this is the Java Gaming forum so I was curious if anyone has done this in the context of Java.

I’m not sure how you can make this claim when what I have shown is so narrow ( essentially a list of different types of Event Messages). It is data driven, and I don’t think that a bunch of Event Messages that have a common base type constitutes “too little composition over inheritance”.

The “lack of design” was not directly targeted to this thread, but to the “verbose” problem.