Genprefix and Ctrl-H in symbols?



Genprefix was maclisp's way of keeping gensyms generated by different
runs of the lisp compiler from re-using names.  That is, if you compiled
two files, each in a new lisp image, you might find that it generated
gensyms (labels, variable names, etc)  in some sequence,
g0001
g0002
....
which overlapped in the two object files.  The thought was that
this could cause problems.  Unlikely, but maybe a precaution.
Note that when the compiler produced a gensym and writes it out
to a file, it probably became interned when it was read back
in.  Common Lisp is cleaner this way.

So the genprefix came about so that file 1 makes gensyms
a1_0001
a1_0002

and file 2 with a genprefix of b2_   does ..
b2_0001
b2_0002
   etc.

I believe that gensym takes an optional argument that has
exactly the operation of genprefix.

Your Macsyma historical society representative...
RJF



Raymond Toy wrote:

> Does anyone know what genprefix means in the Lisp code?  Also some of
> the symbols listed with genprefix have a Ctrl-H embedded within the
> symbol.  Is there a reason for this?
> 
> If not, I'd like to just delete the Ctrl-H.  (Lispworks complains
> about these.)
> 
> Ray
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>