Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

GENSYM is Harder than You Think

Name: Anonymous 2013-06-26 18:50

How does one implements GENSYM[1] in a robust and thread safe way? What if several programs have to interchanged generated SEXPs, so that symbols wont clash? Say two different compilers gensyming assembly output may produce clashing identifiers.

[1] http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/fun_gensym.html

Name: Anonymous 2013-06-27 1:34

How does one implement GENSYM[1] in a robust and thread safe way?

By locking the symbol table when interning a new symbol.

What if several programs have to interchange generated SEXPs, so that symbols wont clash?

Force symbols gensymed by different programs to reside in different packages.

Say two different compilers gensyming assembly output may produce clashing identifiers.

Add a concept of scope and make gensymed variables local.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List