[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: opaque type proposal
Date: Mon, 6 Jun 88 11:39:06 PDT
Alan is concerned that allowing single inheritance now might be a hinderance
later if we decide to extend to multiple-inheritance. I don't claim to be a big
expert, but it seems to me that all of the multiple-inheritance facilities that
I've seen have precisely the same simple single-inheritance semantics as a
special case. Alan (or anyone else), do you know of any exceptions to this? If
not, then I would think that we were fairly safe in going this far (and no
Well first off, they might all be wrong, and when the clearly right thing
emerges it might not have the single inheritance semantics that we expect.
(Actually, isn't there already division between those who thing that
children should automatically inherit all of their parents slots, and
those who think that you should have to explicitly import those slots that
the child wants to be able to directly access?)
But putting that kind of issue aside, I had a much more mundane kind of
problem in mind. For example, if we decide now that single inheritance is
accomplished by calling
(MAKE-RECORD-TYPE <name> <slot-names> <parent-type-descriptor>)
then we have to decide later how to specify multiple superiors in an
upward-compatible way. Do we let the third argument be -either- a single
record-type-descriptor or a list of record-type-descriptors? That's only a
little ugly. But perhaps it turns out that instead of an ordered sequence
of record-type-descriptors, we want to provide a procedure that you apply
to an operation, and it returns a record-type-descriptor. Then do we
specify that the third argument is either a procedure or a record-type-
descriptor (where the latter is taken to be an abbreviation for the one
argument procedure that always returns that record-type-descriptor)?
Now the ugliness starts to mount.
Now I'm sure we can guard against this -particular- screw (or convince
ourselves that it isn't a problem). But my point is that I feel that we
are unlikely to be able to start in the direction of inheritance without
inviting -some- problem like this.