Xref: utzoo comp.lang.eiffel:1407 comp.object:2557 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hplabs!otter.hpl.hp.com!hpltoad!cdollin!kers From: kers@hplb.hpl.hp.com (Chris Dollin) Newsgroups: comp.lang.eiffel,comp.object Subject: Re: Granularity (was: Inheritance and Information Hiding) Message-ID: Date: 11 Feb 91 10:05:44 GMT References: <1991Feb8.171341.19413@cs.tcd.ie> <2140@cs.rit.edu> <498@eiffel.UUCP> Sender: news@hplb.hpl.hp.com (Usenet News Administrator) Organization: Hewlett-Packard Laboratories, Bristol, UK. Lines: 29 In-Reply-To: bertrand@eiffel.UUCP's message of 9 Feb 91 23:39:29 GMT Nntp-Posting-Host: cdollin.hpl.hp.com In all this debate about RECTANGLE, POLYGON, and add_vertex, I have wondered one thing; what is the add_vertex feature *for*? There are two possibilities that come to (my) mind. One is that it is required so that a POLYGON object can be created and then its vertices added (because they cannot be designated at the moment of creation); in this case, once the vertex initialisation is complete, one would not expect further calls to add_vertex. In this case it seems to me that add_vertex is really only an encoding of create-me-this-polygon-with-these-vertices, and that a way of saying this without lots of separate feature calls might be advisable. (In Lisp or Pop, one might create the object passing in a list/vector/other-collection of verticies.) The other possibility is that during the adult life of a polygon (as opposed to its infancy) its number of vertices changes for whatever reason (didn't somebody suggest a graphics editor where the user can add and remove verticies?). I'd like to know which of these two cases is the norm in which situations, and if there are any other reasonable patterns of add_vertex use. Incidentally, I'm in the camp that says "if POLYGON has add_vertex, then RECTANGLE is not a subtype of / does not inherit from POLYGON". -- Regards, Kers. | "You're better off not dreaming of the things to come; Caravan: | Dreams are always ending far too soon."