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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,76ec5d55630beb71 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-02 07:33:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!213.200.246.247!not-for-mail From: Vinzent Hoefler Newsgroups: comp.lang.ada Subject: Re: Ada 200X Date: Mon, 02 Jun 2003 16:31:49 +0200 Organization: JeLlyFish software Message-ID: References: <3EDAD07A.3010200@attbi.com> <3EDB5DBE.4070807@attbi.com> NNTP-Posting-Host: 213.200.246.247 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: fu-berlin.de 1054564387 8780751 213.200.246.247 (16 [175126]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:38351 Date: 2003-06-02T16:31:49+02:00 List-Id: Robert I. Eachus wrote: >Larry Kilgallen wrote: > >> The lack of a construct to specify "corresponding method of ancestor" >> seems to me to be what breaks information hiding. > >Oh, that is so easy that I never thought of people having problems with=20 >it. I'll give an example: > >type Foo is tagged... > >procedure Bar(F: in out Foo); >... > >type New_Foo is new Foo with... > >procedure Bar(F: in out New_Foo); >... > >procedure Bar(F: in out New_Foo) is >begin > Do(Something_Special); > Bar(Foo(F)); -- view conversion > Do(Something_Else_Special); >end Bar; > >The view conversion passes the Foo part of a New_Foo object to the=20 >parent Bar by reference. Yeah, but what happens if you insert |type Baz is new Foo with ... | |procedure Bar (F : in out Baz); | |type New_Foo is new Baz with ... is that you have to change every single view conversion in New_Foo's methods from |Bar (Foo (F)); to |Bar (Baz (F)); Because the view conversion to a grandparent is of course allowed, this is little tricky if not to say error prone sometime. Well, yes, I know, you should always design your object hierarchy beforehand. ;-) Vinzent. --=20 Parents strongly cautioned -- this posting is intended for mature audiences over 18. It may contain some material that many parents would not find suitable for children and may include intense violence, sexual situations, coarse language and suggestive dialogue.