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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.4.81 with SMTP id 78mr43269ioe.18.1449001033062; Tue, 01 Dec 2015 12:17:13 -0800 (PST) X-Received: by 10.182.28.129 with SMTP id b1mr387537obh.4.1449001033041; Tue, 01 Dec 2015 12:17:13 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!mv3no7447380igc.0!news-out.google.com!f6ni15678igq.0!nntp.google.com!mv3no9367411igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 1 Dec 2015 12:17:12 -0800 (PST) In-Reply-To: <3d45e3ed-16ca-4018-bf7b-62830acaca03@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=208.103.74.131; posting-account=ShYTIAoAAABytvcS76ZrG9GdaV-nXYKy NNTP-Posting-Host: 208.103.74.131 References: <3d45e3ed-16ca-4018-bf7b-62830acaca03@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <93c1ed75-26a7-44fa-ad0b-509caeabb400@googlegroups.com> Subject: Re: accessibility check failed From: sbelmont700@gmail.com Injection-Date: Tue, 01 Dec 2015 20:17:13 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:28615 Date: 2015-12-01T12:17:12-08:00 List-Id: On Sunday, November 29, 2015 at 1:03:28 PM UTC-5, Serge Robyns wrote: >=20 > The idea is to return a copy of the client record and store with it a ref= erence to the data store class from which the object came from. This will = allow to use my_object.change_XYZ to update the object and it's representat= ion into the store through that reference. >=20 You seem to be implementing an abstract container of abstract objects, and = so without wading into the OOP/AAT debates, that's one of the few legitimat= e uses of return-by-anonymous-access, e.g. overriding function Get_Client (Self : T_Data_Store;=20 Client_Name : T_Client_Name) return access T_Client'Class Now there's no DAO object at all, and you save yourself *lots* of keystroke= s. Or, better yet, use the dubious 'accessor' pattern to wrap the return v= alue to further protect it (i.e. an access discriminant). But as was said, as a general rule, AAT's are specialized tools for special= ized jobs with special rules and special effects, so be sure you understand= the *ALL* the implications before you use them. -sb