Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!pasteur!jwz@teak.berkeley.edu From: jwz@teak.berkeley.edu (Jamie Zawinski) Newsgroups: comp.lang.lisp Subject: Re: Question about Macros (Common Lisp) Message-ID: <21779@pasteur.Berkeley.EDU> Date: 5 Feb 90 18:02:29 GMT Sender: news@pasteur.Berkeley.EDU Lines: 32 In-reply-to: In article lou@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