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.6 required=5.0 tests=BAYES_00,LOTS_OF_MONEY, TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,478da2f57395e4f6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-06 08:47:22 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!feed.textport.net!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: Subject: Re: Setters and Getters - Classwide or Dispatching? Message-ID: <34l17.9638$Kf3.106061@www.newsranger.com> X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Fri, 06 Jul 2001 11:47:11 EDT Organization: http://www.newsranger.com Date: Fri, 06 Jul 2001 15:47:11 GMT Xref: archiver1.google.com comp.lang.ada:9561 Date: 2001-07-06T15:47:11+00:00 List-Id: In article , Anthony E. Glover says... > >What is the best approach for declaring setters and getters for a class - >classwide or primitive subprograms. Classwide would seem to be the best >approach since in all likelihood no one would override the getting or >setting of an attribute; however, this means that the operation is not >inherited by subclasses It means it isn't overridable with a dispatching subprogram. You can still use it for any subclass. > and requires an additional 'with' and possible 'use' >of the base class in order for the operation to be visible. Any suggestions? One common approach is to put "child" classes in child packages. That way the "with" and "use" are implicit. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html home email - mailto:dennison@telepath.com