4 ms·
Compiling to C is not at all an uncommon strategy, there's at least one pretty serious Scheme implementation [1] that does this. Portability between architectur
by spacemanaki 14y ago
Compiling to C is not at all an uncommon strategy, there's at least one pretty serious Scheme implementation [1] that does this. Portability between architectures is a pretty big advantage, but in this case another one is leveraging the Boehm GC, rather than rolling your own. Could you use the Boehm GC if you emitted assembly? I would guess maybe it's possible, but you'd have to emit assembly that followed C calling conventions, I would imagine. Emitting C might be easier. Lisp in Small Pieces has a pretty big chapter that goes into detail how to compile Lisp to C.
[1] http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Main_Page http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Main_P...
see also:
http://www.iro.umontreal.ca/~boucherd/mslug/meetings/20041020/90-min-scc/90-min-scc.pdf http://www.iro.umontreal.ca/~boucherd/mslug/meetings/2004102...
http://www.iro.umontreal.ca/~boucherd/mslug/meetings/20041020/minutes-en.html http://www.iro.umontreal.ca/~boucherd/mslug/meetings/2004102...
- takeoutweight 14y agoin clojure-scheme I actually compile Clojure to Gambit to make use of Gambit's awesome runtime. It's a very good match for Clojure. https://github.com/takeoutweight/clojure-scheme https://github.com/takeoutweight/clojure-scheme