[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

'#:foobar versus (make-symbol "FOOBAR")



Reply To: Gallagher@cs.umass.edu
   
	I would be the last to suggest that programmers need not be very careful
	about unneccessary consing.  However, in the case of macros, worrying
	about generating a few extra uninterned symbols is a red herring.  The
	uninterned symbols are only used to name local variables, which the
	compiler will turn into references to stack locations.  The actual names
	of the locals don't need to be saved, and most compilers are smart
	enough not to save the names if they are uninterned symbols.  (Most
	compilers do save the names of other locals which makes debugging much
	easier.)

I never claimed that the space savings was significant or important.

	In this case, the cost of a few extra symbols at compile time is well
	worth the added safety of truly unique names.

I think you missed the point.  It is NO safer to use unique symbols for local
variables when they're bound by LET.  It's okay to make a trade-off for safety,
but in this case, it's nothing but a waste of space.  

I'm still not claiming it's significant, just that using MAKE-SYMBOL in this
case is unnecessary.

-david