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=unavailable autolearn_force=no version=3.4.4 Path: buffer2.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Design of cross referring types/classes and proper usage of containers Date: Tue, 4 Aug 2015 12:20:01 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <12wxvkghwgpw3.k4qf1rqnppjb$.dlg@40tude.net> <8b424e66-337a-4943-91d1-e421312b5c95@googlegroups.com> <186o8cox1jqwa.yahqsx8p0k84$.dlg@40tude.net> <3341271b-4926-40cb-a9aa-660522d56f24@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Tue, 4 Aug 2015 19:18:27 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="ee44d3db9c41f5ad88d7e8e8f0268f05"; logging-data="11571"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/HJUkqybK2lDO/KByhbfwk62gLADtvGwo=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 In-Reply-To: <3341271b-4926-40cb-a9aa-660522d56f24@googlegroups.com> Cancel-Lock: sha1:/zxaAh/DqOSv/aPtyg3lgRQfc5o= Xref: number.nntp.giganews.com comp.lang.ada:194662 Date: 2015-08-04T12:20:01-07:00 List-Id: On 08/04/2015 12:00 PM, Serge Robyns wrote: > And I've a final question based on the advise. > > Given static (immutable data) one one hand and dynamic data (changed during the execution) on the other hand; stored in various containers. What is actually the best approach? Shall I Storing the full element of objects or references created through new T_xyz? > > If I want to use an access variables in the first method, do I need to pass an aliased type? Your problem does not need access types, and will be clearer and simpler without them. You could have maps: (client ID) -> (client info) (subscription ID) -> (subscription info) Client info may contain subscription IDs, and subscription info may contain client IDs. If you have one and not another, you use the ID to obtain the info. -- Jeff Carter "Have you gone berserk? Can't you see that that man is a ni?" Blazing Saddles 38