Ruschm icon indicating copy to clipboard operation
Ruschm copied to clipboard

feature garbage collection

Open Danielmelody opened this issue 3 years ago • 0 comments

Following R7RS-small

All objects created in the course of a Scheme computation, including procedures and continuations, have unlimited ex- tent. No Scheme object is ever destroyed. The reason that implementations of Scheme do not (usually!) run out of storage is that they are permitted to reclaim the storage occupied by an object if they can prove that the object cannot possibly matter to any future computation.

The three possible situations mentioned in #54

  • unsafe scheme
  • native code with a native gc
  • rust-like lifetime checker to reject unsafe use of closure

Will now end up with the second one. GC is now necessary for a practical interpreter and also necessary for a compiler, like in chez scheme.

Danielmelody avatar Oct 06 '22 18:10 Danielmelody