Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!argosy!kentb From: kentb@argosy.UUCP (Kent Beck) Newsgroups: comp.lang.smalltalk Subject: Re: method-ology Message-ID: <1387@argosy.UUCP> Date: 24 Jun 91 15:54:33 GMT References: Sender: news@argosy.UUCP Reply-To: kentb@maspar.com (Kent Beck) Distribution: comp Organization: MasPar Computer Corp, Sunnyvale CA Lines: 15 Every case I've ever seen of a method which simulated multiple valued return by returning Arrays or (much worse) Points could be rewritten by figuring out what kind of real object you want to return. The need to return multiple objects from a method tells me that I have discovered an object, I just don't know what to call it or what its responsibilities are yet. In these cases I force myself (however inconvenient it seems at the time) to create a new object which holds the multiple objects I want to return. I always find many unforeseen uses for these serendipitously discovered objects. I consider this technique a compelling example of the value of incremental design: I would never have designed these objects up front, but even though they are discovered "in the heat of battle" they can be some of the most useful implementation- level objects I create. Kent