Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!seal.cis.ohio-state.edu!ogden From: ogden@seal.cis.ohio-state.edu (William F Ogden) Newsgroups: comp.sw.components Subject: Re: OOP and re-usable cakes Message-ID: <82593@tut.cis.ohio-state.edu> Date: 31 Jul 90 21:32:55 GMT References: <27705@athertn.Atherton.COM> <71800004@m.cs.uiuc.edu> <620@.tetrauk.UUCP> <7057.26b57e9c@swift.cs.tcd.ie> Sender: news@tut.cis.ohio-state.edu Reply-To: William F Ogden Organization: Ohio State University Computer and Information Science Lines: 36 In article <7057.26b57e9c@swift.cs.tcd.ie> omahony@swift.cs.tcd.ie writes: >>There will be a recipe in the library for a plain cake.If you want to write a >>recipe for a fruit cake, you just write "Proceed as for a plain cake, but add >>a handful of fruit in the final mixing" (this is not a recommendation for my ... >I like this analagy - now suppose you want to make a loaf of bread, or an >omlette. Even though both of these involve gathering materials together >in a bowl, agitating them and then applying heat (am I making you hungry!) > - they are not instances of the class 'cake'. > >My basic point is that the use of classes/objects as reusable components >suffers from similar (though not as severe) problems to procedure libraries. ... >Comments? Actually there is a good example of reusability lurking here, but not in the recipes. The designer of kitchen equipment looks at the omelet, bread, cake, etc. problem and notices that they all involve agitating ingredients in a bowl. The potential for reusability is clear (and vital to marketing, since cooks don't really want a million gadgets in their kitchens) and thus the mixer is born. Similarly, the `applying heat' problem is solved by the highly reusable stove. The containment of ingredients while heating problem has special features that lead to the less reusable bread pan, cake pan, frying pan, etc. An important point to note here is the independence of the reusable components. You don't inherit a stove with a built-in bread pan, notice that it's 90% appropriate for the cake heating problem, and modify it to create a stove with a built-in cake pan. Moreover, you rarely find a stove with a built-in mixer. Another point to note is that recipes respect the integrity of reusable components. They don't ask the cook to reshape the blades in the mixer or cut a small hole in the oven door. /Bill