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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7f2ce8bda9cae4ab X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news1.google.com!news.glorb.com!newsfeed.stueberl.de!eusc.inter.net!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: "Must instantiate controlled types at library level." Why? Date: Fri, 21 May 2004 11:39:10 +0000 (UTC) Organization: GMUGHDU Message-ID: References: NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1085139550 27785 134.91.1.34 (21 May 2004 11:39:10 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Fri, 21 May 2004 11:39:10 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: controlnews3.google.com comp.lang.ada:739 Date: 2004-05-21T11:39:10+00:00 List-Id: Dmitry A. Kazakov wrote: : Technically what is needed is abstract array interfaces, abstract : index types, discriminants for all types, an ability to put type tags : and disctiminants in a dope separate from the value, pure compile-time : subprograms to evaluate does, supertypes. Give me that, then ask (:-)) function item_at (a: Array'type; pos: Index'type) return Element'type; Like this? Is this efficient? How many checks are needed at run time (in the presence of separate compilation)? How do you get hold of plain basic types? Anyway, there are two articles on "Genericity versus Inheritance" by Meyer (1986) and Seidewitz (1994) that I'll have to study first, I guess. -- Georg