Pankaj Surana Appendix F credit: Copyright of Pankaj Surana. The Hotdog Scheme compiler tests the feasibility of compiling an advanced functional language to an object-oriented virtual machine (VM); in particular, the compiler targets the .NET Common Language Runtime (CLR) and the Java Virtual Machine (JVM). As both are ported to more platforms and increasing numbers of programmers write more libraries, these VMs present an attractive alternative to compiling directly to the hardware. However, the compiler must somehow cross the semantic gap between functional and object-oriented languages. The Hotdog compiler aims to translate Scheme to code approximating the output of an object-oriented compiler, rather than exploiting the idiosyncrasies of a particular VM implementation. The overall performance of Scheme programs compiled to these VMs tends to be better than that of a Scheme interpreter, but falls short of optimizing Scheme native-code compilers. |