mal
mal copied to clipboard
What with `` gensym ''
In step 8 I was suddenly confronted with gensym. That may be familiar to lispians, but not to me. gensym was not introduced in any way, and the test of or in step 8 requires it. (I chased down or in other files, I think that it should be contained in step8_macro.mal).
Apparently (gensym)
is a command that generates a new free symbol, that cannot be evaluated as yet.
In my implementation all objects have a slot for names and linkings, and a mapping is made filling in the objects name and linking it in in the appropiate environment. As an object is free, the link to an object is filled in. An anonymous object (e.g. a number) has the slot for the name free, ready to be filled by def! and linked into environment.
The phrase (condvar (gensym)
puzzles me in the definition of or. Does that really mean that the value of condvar is a symbol,
so that evaluating condvar yields a symbol? So that we have the same kind of problems like in m4, figuring out how many quotes we must put around expression to prevent evaluation?
I recommend that gensym is introduced in step 0 , or at the latest in step8.