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 04:22:53 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.cis.ohio-state.edu!news.maxwell.syr.edu!nnxp1.twtelecom.net!216.170.153.135.MISMATCH!tdsnet-transit!newspeer.tds.net!news.binc.net!kilgallen From: Kilgallen@SpamCop.net (Larry Kilgallen) Newsgroups: comp.lang.ada Subject: Re: Ada 200X Date: 2 Jun 2003 06:22:49 -0500 Organization: LJK Software Message-ID: References: <3EDAD07A.3010200@attbi.com> NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 1054552952 8807 192.135.80.34 (2 Jun 2003 11:22:32 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Mon, 2 Jun 2003 11:22:32 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:38332 Date: 2003-06-02T06:22:49-05:00 List-Id: In article <3EDAD07A.3010200@attbi.com>, "Robert I. Eachus" writes: > And838N@netscape.net wrote: > > > There was one other issue I came across when writing my first Linked > > list in Ada. There is no "this" keyword. It didn't take long for me > > to realize that a class in Ada is not at all like a class as I > > understand from college (C++, Java). The "flavor" of an Ada was C > > struct like to me and required passing "my" instance as a parameter > > to a procedure of function in a package so that I could use "this". > > The feature that you are looking for is called an access discriminant. > This allows an object to have a self reference, or more important, a > reference to the containing object. Unfortunately access discriminants > usually break information hiding. I am not the original poster, but the case where I find this troublesome is trying to replace a method for a parent type with enhanced code to: 1. Do something special 2. Do whatever the method for the parent type would do 3. Do something else special The lack of a construct to specify "corresponding method of ancestor" seems to me to be what breaks information hiding.