From: "Scott McKay" Newsgroups: comp.lang.dylan References: <200005211856.OAA21139@life.ai.mit.edu> Subject: Re: make() and initialize()? Lines: 19 Message-ID: Date: Sun, 21 May 2000 20:17:50 GMT Nolan Darilek wrote in message <200005211856.OAA21139@life.ai.mit.edu>... >I've finally encountered a situation in which I'd like to override the >default/generated constructors. I've seen code which overrides make, >and code which overrides initialize on the new class. What is the >difference between make() and initialize()? 'make' allocates a new instance. You can completely override 'make', for example, if you are maintaining a cache of objects and want to return an existing object. 'make()' in Fun-O Dylan does this to return a canonical empty vector, e.g. 'initialize' initializes its slots. You can't completely override 'initialize' methods. They should always have a call to 'next-method()' in there somewhere, most often at the very beginning.