From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,9a0ff0bffdf63657 X-Google-Attributes: gidfac41,public X-Google-Thread: f43e6,9a0ff0bffdf63657 X-Google-Attributes: gidf43e6,public X-Google-Thread: 103376,4b06f8f15f01a568 X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,9a0ff0bffdf63657 X-Google-Attributes: gid1108a1,public From: Chris Kuan Subject: Re: Module size (was Re: Software landmines) Date: 1998/09/04 Message-ID: <35EF7294.35E0@sig.please>#1/1 X-Deja-AN: 387733575 Content-Transfer-Encoding: 7bit References: <6rfra4$rul$1@nnrp1.dejanews.com> <35DBDD24.D003404D@calfp.co.uk> <6sbuod$fra$1@hirame.wwa.com> <904556531.666222@miso.it.uq.edu.au> <6sgror$je8$3@news.indigo.ie> <6sh3qn$9p2$1@hirame.wwa.com> <6simjo$jnh$1@hirame.wwa.com> <6sjk3p$4tc$1@hirame.wwa.com> <6skgn4$3gq$1@hirame.wwa.com> <35EF3158.5097@sig.please> Content-Type: text/plain; charset=us-ascii Organization: None Mime-Version: 1.0 Reply-To: look@sig.please Newsgroups: comp.lang.eiffel,comp.object,comp.software-eng,comp.lang.ada Date: 1998-09-04T00:00:00+00:00 List-Id: Jeffrey C. Dege wrote: > > On Fri, 04 Sep 1998 10:16:24 +1100, Chris Kuan wrote: > >Jeffrey C. Dege wrote: > >> [...] When I tell him that we have > >> 63 methods that contain zero lines of code, he wants to know why we > >> bothered to write them in the first place, if they don't do anything. > >> > >> I can't think of a short answer. > > > >How about "because they one day might"? > > > >That's a bit glib, I know, but maybe there's some truth > >to it in your situation which your manager will recognise. > > No, that's not it. We have empty methods because we have a method in > an inheritence hierarchy that should nothing when invoked on the base > class directly, but should definitely do something when invoked on > objects of certain derived classes. There's no "some day" involved. > > Then, of course, there are our empty virtual destructors, and constructors > that do nothing but pass arguments to their parent constructors (which > the tool I was using counted as having zero lines of code, because > there was nothing between '{' and '}'). In that case, I'd go with Patrick's approach. But it's harder to justify to someone inexperienced in the language. -- Chris Kuan, BHP Information Technology Concatenate for email: mr gazpacho @ hotmail . com Phone : +61 2 4275 5555 Fax : +61 2 4275 5547 "A Design Pattern is something that got left out of the language" - Richard O'Keefe