Path: utzoo!attcan!uunet!mcsun!inria!irisa!boissier From: boissier@irisa.irisa.fr (franck boissiere,externes ) Newsgroups: comp.object Subject: Re: prototypes and degenerate cases Message-ID: <1990Sep13.064854.8137@irisa.fr> Date: 13 Sep 90 06:48:54 GMT References: Sender: news@irisa.fr Organization: IRISA, Rennes (FR) Lines: 36 Originator: boissier@irisa.irisa.fr From article , by brucec@phoebus.phoebus.labs.tek.com (Bruce Cohen;;50-662;LP=A;): > I've just been reading the Self papers, and it occurred to me that using > prototypes for inheritance could solve a problem which has been annoying me > for quite some time. Maybe some of you out there coould comment on the > theory and/or practice of the idea. > > > Ellipse Circle: > ------ ------- > parent:-----------> traits circle parent:-----------> traits ellipse > focus1 -----------> 0@0 <------------ center > focus2 -----------> 0@0 > focus1: <- > focus2: <- focus2: <- > major radius -----> 1 <------------ radius > minor radius -----> 1 > major radius: <- > minor radius: <- > > This seems significantly cleaner than becomes, and perhaps less work than > the hand-crafted mutator in the class-based approach. Anyone have any > comments? > > -- It is not always needed nor desirable to have object mutating in a system, but this is not exactly the point you make. Object coercion is implemented without invoking becomes: and I feel this is what you need. I don't really see what your example in Self does better compared to the "asSUCH" methods of Smalltalk. I may be missing something. -- Franck BOISSIERE boissier@irisa.irisa.fr Prototyping Lab Manager boissier@ccettix.UUCP C.C.E.T.T. B.P. 59 boissier%irisa.irisa.fr@uunet.uu.net 35512 CESSON SEVIGNE CEDEX FRANCE