Why do you use sym?
Posted: Mon Jul 04, 2011 12:17 am
I'm trying to make review of situations where sym is useful. I use it
- for generation of expressions processed by programs. For example, here:
http://kazimirmajorinc.blogspot.com/201 ... sions.html - for alpha-conversion, i.e. prevention of symbol clashes when calling macros. It is equivalent of use of (gensym) in other Lisp dialects in macro definition. For example, here
http://kazimirmajorinc.blogspot.com/200 ... exprs.html - for bulk definitions of functions or macros using same algorithm, for example, defining operators setq+, setq-, setq* ... such that (setq+ a b) <=> (setq a (+ a b)), (setq- a b) <=> (setq a (- a b)) ... For example, here
http://kazimirmajorinc.blogspot.com/200 ... ashed.html - for simulation of hash tables - in some other language, I'd use B["011101"], in Newlisp I just use symbol B011101. For example, here
http://kazimirmajorinc.blogspot.com/200 ... mulas.html