Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!helios.ee.lbl.gov!pasteur!fir.Berkeley.EDU!faustus From: faustus@fir.Berkeley.EDU (Wayne Christopher) Newsgroups: comp.lang.lisp Subject: Re: Using Packages With CLOS Message-ID: <26581@pasteur.Berkeley.EDU> Date: 30 Jul 90 23:03:18 GMT Sender: news@pasteur.Berkeley.EDU Reply-To: faustus@fir.Berkeley.EDU (Wayne Christopher) Organization: University of California at Berkeley Lines: 24 X-Local-Date: 30 Jul 90 16:03:18 PDT The problem with using packages and CLOS is that unless you are careful you can get lots of name conflicts. Say I have two rather general classes, foo and bar, each in its own package. Each has a slot called "name", and, following the convention used in the CLOS book, I have defined and exported accessors called "name" for both. When I try to use both classes in one package, I get a symbol conflict. There are a few ways to avoid this: 1. Make foo import the symbol name from bar, or vice versa -- not too modular. 2. Use keywords for accessor functions. Pretty ugly. 3. Don't use-package either foo or bar, and use foo:name or bar:name when necessary. 4. Call the accessor functions foo-name and bar-name, as with structures. I've been using (4), but it was sort of an annoying surprise to realize that converting my program to use packages would require me to change all my accessor function names. Wayne