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=-0.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,103b407e8b68350b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-06 08:23:08 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!news.infoave.net!newsfeed1.easynews.com!easynews.com!easynews!cyclone.swbell.net!bos-service1.ext.raytheon.com!dfw-service2.ext.raytheon.com.POSTED!not-for-mail From: Wes Groleau Reply-To: wesgroleau@despammed.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en,es-MX,es,pt,fr-CA,fr MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Anybody in US using ADA ? One silly idea.. References: <3E147D79.2070703@cogeco.ca> <4519e058.0301031434.51a0c880@posting.google.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Mon, 06 Jan 2003 11:23:07 -0500 NNTP-Posting-Host: 151.168.133.155 X-Complaints-To: news@ext.ray.com X-Trace: dfw-service2.ext.raytheon.com 1041870187 151.168.133.155 (Mon, 06 Jan 2003 10:23:07 CST) NNTP-Posting-Date: Mon, 06 Jan 2003 10:23:07 CST Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:32618 Date: 2003-01-06T11:23:07-05:00 List-Id: > 1. Generics are static. You cannot have an object or dynamic-link library of > generics. > > 1.a. This kills code reuse at run-time. Weakens it, but does not "kill" it. I can instantiate a generic at run-time. And that generic can instantiate another generic or give actuals to another generic. Where is the body code for the following instantiations? -- Admittedly, this is a pretty unlikely scenario! procedure Demo (First : Natural) is type Weird_Num is range First .. Last_Function (First); type Weird_Record is record Field_That : .....; Did_Not : Weird_Num; Exist_Before : .....; end record; This_Is_It : Weird_Record; package Temporary is new Wierd_Thing (Weird_Num, Weird_Record); function Make_Weird is new Oddball (Weird_Num, Temporary.Weird_Function); begin ....; -- Generate the contents of This_Is_It. Ada.Text_IO.Put_Line (Temporary.Image_Of (Make_Weird (This_Is_It));