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: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Using Generic Pasckages Date: Sat, 11 Apr 2020 16:15:58 +0200 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <5e8edf69$0$18432$e4fe514c@news.kpn.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 11 Apr 2020 14:15:59 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="152f6b22dc59a571f135b23145b4f4f3"; logging-data="19858"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Nv+EJt7fHZ5/3BdgEvJXdRsUPgId/2ww=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 Cancel-Lock: sha1:u0oEHt2mn/aHZM45WLTUppehNo4= In-Reply-To: Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:58344 Date: 2020-04-11T16:15:58+02:00 List-Id: On 4/11/20 3:16 PM, ldries46 wrote: > I already have a generic package for such a buffer (instantiations can be made > for all kind of types(f.i integers, unbounded_Strings). Do it is logical that I > want to use that package with two instantiations for the same type. If your generic requires 2 instantiations to have 2 buffers, then it's an Abstract State Machine (ASM). Another approach is an Abstract Data Type (ADT). With an ADT you'd have a single instantiation and 2 objects of the ADT's type. -- Jeff Carter "Frankie Wolf, wanted by Federal authorities for dancing with a mailman." Take the Money and Run 143