"is a" relationships

Michael Richardson mcr at latour.sandelman.ocunix.on.ca
Thu Sep 24 15:07:41 UTC 1992

On Sep 23,  7:43pm, Brad Might wrote:
} This is what I have tried, is it the way to go ? 
} prototypes _AddSlots: (| 
} 	animal = (| 
} 		parent* = traits animal.
} 		"object specific stuff here".
} 		|).
} 	mammal = (|
} 		parent* = traits mammal.
} 		inherit**. "at initialization (copy), this slot will be
} 				filled in with a copy of prototypes animal"

   You are not the only one to ponder exactly how to do this. 
   Particularily nasty is that changing the animal prototype doesn't
affect the inherited slots of mammal at all. Of course, it doesn't
affect any existing animals either. I was hacking on `copy-on-write'
slots at one point, but this as was with 1.1, and one couldn't 
use _AddSlots: from within a method...
   I think that something like that is the solution. 

   :!mcr!:            |  The postmaster never | So much mail, 
   Michael Richardson |    resolves twice.    |  so little time.
HOME: mcr at sandelman.ocunix.on.ca     Bell: (613) 237-5629
SCHOOL: 192228 at physics.carleton.ca      

More information about the Self-interest mailing list