David Storrs writes: > On Mon, May 02, 2005 at 06:49:10PM +0200, Thomas Sandlaà wrote: > > David Storrs wrote: > > >class Tree { > > > method bark() { die "Cannot instantiate a Tree--it is abstract!" } > > >} > > >class Birch { > > > method bark() { return "White, papery" } > > >} > > >class Oak { > > > method bark() { return "Dark, heavy" } > > >} > > >class Dog { > > > method bark() { print "Woof, woof!"; return "bow wow" } > > >} > > >class AlienBeastie isa Tree isa Dog {} > > > > Here you get an error/warning of a composition time conflict between > > &Tree::bark and &Dog::bark. > > So that I'm clear, is this your opinion/preference or is it based on > material from the SEAs? If the latter, could you point me to the > relevant passage?
As has been pointed out, there's no composition going on. But we are getting rid of search order problems, so you'll get an ambiguous method call error at some point. Whether this is at the time you create the class or the time you try to call the method, I do not know. > > > My preferred > > syntax for multiple inheritance is the junctive notation 'is Tree & Dog' > > for subclassing because it nicely allows for superclassing with > > 'is Tree | Dog'. > > Again, so that I'm clear--this is your preference, and is not derived > from any authoritative source, correct? Not authoritative. I, for one, really want the ability to superclass a posteriori, but I'm not sure this is how you do it. Luke