Silly idea?
I wonder if it's worth considering setting up something that'll generate C++ code from sexps? Similar to the various HTML or HLSL/CG generators. Might be interesting to think about...
Investigating Common Lisp for games
7 Comments:
How would this be different from a translator/compiler like Bigloo? Most especially in terms of functionality provided, as I doubt that many people will care that it can't done interactively from a bigger (Common) Lisp programme.
How do you see it working? are you talking about doing (forgive java syntax, i don't know C++):
(gen-java '(public class Foo (:extends Bar)
(public String hello (String args)
...)))
=>
"public class Foo extends Bar {
public String hello(String args) {
...
"
Could be useful for eliminating boiler-plate code!
The gen-java example is pretty much what I was thinking of. I guess I'm thinking more of a preprocessor than something that generates C(++) code from lisp code.
One possible use could be that if you're alternating hard/soft layers you could have all the code in your lisp files.
However, I'm starting to think that it isn't all that great an idea - just something born out of having to do dodgy hacks with the c preprocessor and wishing I had lisp.
See also Symbolic C Expressions to generate C code and LINJ which macro-generates/infers java code.
Thanks Brian! The scexp site seems to be down at the moment, but Linj is pretty much exactly what I was thinking of.
InteLib - is a library of C++ classes which lets you do Lisp programming within your C++ program even without any additional preprocessing, without all those calling conventions etc.
InteLib - is a library of C++ classes which lets you do Lisp programming within your C++ program even without any additional preprocessing, without all those calling conventions etc.
Post a Comment
<< Home