Re: CLOS class in different packages





dneu@xxxxxxx wrote:
Hi,

I have a parent CLOS class and related generics defined in one
package, and have classes derived from the parent defined in other
packages. In order to access slots defined in the parent, from the
derived class, I had to either:

1. export them from the parent class, or
2. qualify them using the package name, e.g. parent::last-name

Option 1 seems to sort of "disconnect" the slot from it's class, and

"seems to sort of" IIANM translates as "does not" (and then you can take the I-do-not-really-mean-it antlers off disconnect).

Note that you /do/ "desire to access [the] slots" from a different package. Why making public something you want to be public constitutes "disconnect" needs clarification. :)

option 2 seems somewhat clumsy.

Is there another option?

Are you looking for that "friends" stuff from C++ (if I have that right, unless it was Java <g>). This is Lisp, we just shoot from the hip and do not worry about that stuff.

hth,kt

--
Algebra: http://www.tilton-technology.com/LispNycAlgebra1.htm

"Well, I've wrestled with reality for thirty-five
years, Doctor, and I'm happy to state I finally
won out over it." -- Elwood P. Dowd

"I'll say I'm losing my grip, and it feels terrific."
-- Smiling husband to scowling wife, New Yorker cartoon
.