From: Jamie Zawinski
Subject: Re: Question about Macros (Common Lisp)
Date: 
Message-ID: <21779@pasteur.Berkeley.EDU>
In article <························@atanasoff.rutgers.edu> ···@atanasoff.rutgers.edu (Lou Steinberg) writes:
>
> [...] To really do it right, you need to search the value of test-part for
> any symbol whose print-name is "*SPEC*", and use that symbol for your lambda
> variable.  [...]
> 
> A possibly cleaner solution is to find any symbol in test-part that
> has a print-name of *SPEC* and replace it with YOUR symbol *SPEC*.
> 
> 	 `(setf (structure-test foo)
>  		#'(lambda (*SPEC*)
> 		   ,@(subst-if  '*SPEC* 
> 		             #'(lambda (x) (and (symbol x)
> 					        (string-equal (symbol-name x)
> 					                      "*SPEC*")))n
> 			     test-part)))
> 

I think one of the biggest flaws with the Common Lisp package system is that
it is confusing.  In fact, it is so confusing, that sometimes people get the
notion that evil hacks like the above are "right" or "clean."

Don't try to circumvent the namespace hierarchy like this; you *will* lose, 
eventually.  Come at it from the other direction - instead of bashing the code
so that the symbols are the same, manipulate the hierarchy of your packages so
that the symbols come out equivalent automatically.

If you don't feel like you fully understand the package system, don't use it.
Put all of your code in one package until you do.  It will make your life much
happier.

		-- Jamie
From: Lou Steinberg
Subject: Re: Question about Macros (Common Lisp)
Date: 
Message-ID: <Feb.6.10.23.15.1990.3475@atanasoff.rutgers.edu>
In article <·····@pasteur.Berkeley.EDU> ···@teak.berkeley.edu (Jamie Zawinski) writes:

> In article <························@atanasoff.rutgers.edu> ···@atanasoff.rutgers.edu (Lou Steinberg) writes:
> >
> > A possibly cleaner solution is [...]
                    ^^
> 
> I think one of the biggest flaws with the Common Lisp package system is that
> it is confusing.  In fact, it is so confusing, that sometimes people get the
> notion that evil hacks like the above are "right" or "clean."

Please note the indicated 2 characters above.

> If you don't feel like you fully understand the package system, don't use it.
> Put all of your code in one package until you do.  It will make your life much
> happier.

You are right, but I suspect that Mr. Turner *thought* he understood
the package system when he started, as you and I no doubt both *think*
we understand it even though (due to the complexity) there may well be
gotcha's lurking for us as well.
-- 
					Lou Steinberg

uucp:   {pretty much any major site}!rutgers!aramis.rutgers.edu!lou 
arpa:   ···@cs.rutgers.edu