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=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,da85d9aaf769b16a X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!b2g2000yqi.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Hibou57_=28Yannick_Duch=EAne=29?= Newsgroups: comp.lang.ada Subject: Re: Generic package parameters not externally visible : what's the rational ? Date: Fri, 30 Oct 2009 19:06:56 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <10eygvuzeit9g.xwy2wanxoxgf$.dlg@40tude.net> <1kf8mo4r9lqxg.1tdhqe6femt9m.dlg@40tude.net> <1r8etjwa9k46n.3pyj04jn686o$.dlg@40tude.net> NNTP-Posting-Host: 86.66.190.252 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1256954816 21279 127.0.0.1 (31 Oct 2009 02:06:56 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 31 Oct 2009 02:06:56 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b2g2000yqi.googlegroups.com; posting-host=86.66.190.252; posting-account=vrfdLAoAAAAauX_3XwyXEwXCWN3A1l8D User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; fr),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:8902 Date: 2009-10-30T19:06:56-07:00 List-Id: On 30 oct, 20:32, "Dmitry A. Kazakov" wrote: > Do you use generic in other generics? While I do not know if it is the kind of reply you were expected, here is mine : I use generics in other generics, when a generic has a formal type parameter which come from another generic package. If want want to assert the type T is provided (or derived from the one provided) by a package P, then both P and T must appear in the parameters. If P is generic (this can be legitimate), then you end up with a generic using another generic. Note : and in that case, this may be useful to make this package visible from the outside (exporting the content via renames and subtype, is not always done exhaustively) You may also understand you can have generics dealing with generics, when you use the Mixin pattern to add features in a well designed way, to that if you ever modify the Mixin package, then modifications applies to all the package created with this Minxin. The Mixin may be generic, and the package it receives as a parameter as well. Apologizes if this was not the kind of question you were requesting about.