2 ms·
Welp, you're right, all of those things are true for the lisp files too (not just vp). I just read some sample source and missed https://github.com/vygr/ChrysaL
by lvh 7y ago
Welp, you're right, all of those things are true for the lisp files too (not just vp). I just read some sample source and missed https://github.com/vygr/ChrysaLisp/blob/5483e0926b926c2cde634946a3ec1d943bf087cb/docs/LISP.md https://github.com/vygr/ChrysaLisp/blob/5483e0926b926c2cde63... . I agree those are pretty serious deviations that make "only superficially lisp-like" a reasonable statement. Thanks!
(IIUC the "garbage collector" is refcounting; I'm not sure what "All objects used by the Lisp are reference counted objects from the class library." means in practice, and specifically I'm not sure if that means "you basically have a GC in lisp as long as you don't make cycles".)
- vygr 7y agoIt means what it says ;) All objects used by the Lisp are instances of classes from the class library, ie that stuff in class/ folder. These instances are ref counted objects, as they are derefed and they drop to 0 refs they get deinited and freed. The Lisp is constructed from these, for example Lists in the Lisp are an instance of the class/vector, numbers are an instance of class/num, the environment is a chain of class/hmap etc. So yes, you do have GC if you don't make cycles, and you do have to care about not doing that just as you would in C++.