Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!rivm!siebren From: siebren@rivm.nl (Siebren van der Zee) Newsgroups: comp.lang.modula3 Subject: Multiple inheritance Message-ID: <1991Feb21.131844.5519@rivm.nl> Date: 21 Feb 91 13:18:44 GMT Sender: news@rivm.nl Reply-To: siebren@xirion.nl Organization: RIVM, Bilthoven, Netherlands Lines: 26 Originator: siebren@rivm23 Just curious: how would multiple inheritance fit in Modula 3's type system? I.e. suppose one could write: TYPE t1 = OBJECT METHODS read(buf: Text.T); write(buf: Text.T) END; TYPE t2 = OBJECT hip, hurray: (iene, miene, mutte); METHODS foo(); bar() END; TYPE t3 = t1, t2 OBJECT METHODS yetAnotherMethod() END; VAR foo: t3; How would a procedure that implements yetAnotherMethod be declared? What C-code could the compiler produce to compute the address of foo.hip? Which '<:' relations exist between t1, t2 and t3? (There are probably syntax errors in the above code. I got just about everything to use M3: enthusiasm, a computer. I only lack the compiler...) Siebren