Christophe Rhodes <csr21@...> writes:
> On Sun, Dec 01, 2002 at 04:15:40AM +0200, Valtteri Vuorikoski wrote:
> > I think the right thing to do here would be to import the definition
> > of FOO-A from package A into package B, such that this B:FOO-A can be
> > used to access both instances of S1 and S2 (as happens when no package
> > boundaries are crossed)?
> I don't think so... I would have thought that A:FOO-A is the accessor
> that would be usable to access both S1s and S2s, (and also frankly that
> anyone who's programming like this probably deserves to lose :-)... I
> certainly think that automagic importing of definitions would be a very
> bad thing.
I think the automagic creation of functions, such as what defstruct does,
is generally somewhat evil. But given its philosophy that an accessor to
poke all the members of a given struct will be created in the current
package, I think that importing the other package's functions would
be the right thing here.
We appear to be off the deep end of the standard on this issue, but
it would also be in line with the fact that if there is no conflicting
accessor name present, an accessor for the parent's slots will be created
in the current package.
> > In other news, the STYLE-WARN lossage I mentioned in the previous post
> > happens during force-delayed-defbangstructs. I'm not certain whether
> Well, what is the warning? Is it actually pointing at bad code in SBCL
> I look forward to looking at it more closely.
It's wanting to warn about some accessor-to-be-created being a
redefinition of an existing function, I think it was
TYPE-CLASS-NAME. As said, I haven't looked at this too closely, since
I don't know what force-delayd-bangstructs is supposed to do.