Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!decwrl!parc!janssen From: janssen@parc.xerox.com (Bill Janssen) Newsgroups: comp.lang.modula3 Subject: Re: Instance initialization in Modula-3? Message-ID: Date: 28 Jan 91 23:41:40 GMT References: <1991Jan24.122222.9214@src.dec.com> Sender: news@parc.xerox.com Organization: Xerox PARC, Palo Alto, CA Lines: 18 In-Reply-To: muller@src.dec.com's message of Thu, 24 Jan 91 12:22:22 PST In article <1991Jan24.122222.9214@src.dec.com> muller@src.dec.com (Eric Muller) writes: Modula-3 does not allow you to attach to an object type code to executed when an object of that type is created. Yes. As a workaround, I've decided to create a base class that defines Make(), which is then the new "standard" way of creating an instance. Make() will call the standard methods Allocate() and Initialize(), which can then be appropriately overridden by the subclass implementor. Thanks. Bill -- Bill Janssen janssen@parc.xerox.com (415) 494-4763 Xerox Palo Alto Research Center 3333 Coyote Hill Road, Palo Alto, California 94304