From: sbelmont700@gmail.com
Subject: Re: accessibility check failed
Date: Tue, 1 Dec 2015 12:17:12 -0800 (PST)
Date: 2015-12-01T12:17:12-08:00 [thread overview]
Message-ID: <93c1ed75-26a7-44fa-ad0b-509caeabb400@googlegroups.com> (raw)
In-Reply-To: <3d45e3ed-16ca-4018-bf7b-62830acaca03@googlegroups.com>
On Sunday, November 29, 2015 at 1:03:28 PM UTC-5, Serge Robyns wrote:
>
> The idea is to return a copy of the client record and store with it a reference 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 representation into the store through that reference.
>
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 legitimate uses of return-by-anonymous-access, e.g.
overriding function Get_Client
(Self : T_Data_Store;
Client_Name : T_Client_Name) return access T_Client'Class
Now there's no DAO object at all, and you save yourself *lots* of keystrokes. Or, better yet, use the dubious 'accessor' pattern to wrap the return value to further protect it (i.e. an access discriminant).
But as was said, as a general rule, AAT's are specialized tools for specialized jobs with special rules and special effects, so be sure you understand the *ALL* the implications before you use them.
-sb
next prev parent reply other threads:[~2015-12-01 20:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-29 18:03 accessibility check failed Serge Robyns
2015-11-29 18:37 ` Jeffrey R. Carter
2015-11-29 19:00 ` Serge Robyns
2015-11-29 22:32 ` Jeffrey R. Carter
2015-11-29 22:53 ` Serge Robyns
2015-11-30 2:04 ` Jeffrey R. Carter
2015-11-30 23:22 ` Randy Brukardt
2015-12-01 9:38 ` Serge Robyns
2015-11-29 19:15 ` Dmitry A. Kazakov
2015-11-29 22:40 ` Serge Robyns
2015-12-01 20:17 ` sbelmont700 [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-08-11 2:12 Accessibility " hreba
2014-08-11 5:32 ` Jeffrey Carter
2014-08-11 16:45 ` hreba
2014-08-11 16:55 ` Jeffrey Carter
2014-08-12 11:57 ` hreba
2014-08-11 19:56 ` sbelmont700
2014-08-11 20:17 ` Jeffrey Carter
2014-08-11 20:28 ` sbelmont700
2014-08-11 21:14 ` Jeffrey Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox