Limitations


There are a few problems with implementing Scheme on an object-oriented VM. First and foremost, it is difficult to implement first-class continuations. The Hotdog Scheme compiler does not implement call/cc, because it tries to generate code that the VMs will recognize. One could generate Scheme code that maintained a separate stack in the heap, using the runtime stack for computation only. A Scheme program would simply tail-call from one continuation to the next . This is how many languages implement continuations, with specialized runtime systems to support a program stack in the heap. This would be impractical for Scheme on an object-oriented VM.

Scheme runtime systems, like those in many other languages, often have an interactive command line where expressions can be executed dynamically. Although this approach would be feasible on an object-oriented VM, it has some problems. Closures in Scheme are data types that are garbage collected like any other types when they are no longer referenced. On the VMs, however, closures are methods on classes. Once created, they stick around until the program ends. For lengthy sessions in an interpreter, memory would slowly be consumed by discarded closures. The Hotdog Scheme compiler does not currently support an interactive environment.



Programming in the .NET Environment
Programming in the .NET Environment
ISBN: 0201770180
EAN: 2147483647
Year: 2002
Pages: 146

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net