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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,72659d66ef00787b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-30 05:35:50 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: okellogg@freenet.de (Oliver Kellogg) Newsgroups: comp.lang.ada Subject: Re: Actual subprogram and generic instantiation in same unit Date: 30 Oct 2003 05:35:50 -0800 Organization: http://groups.google.com Message-ID: <6a6390b8.0310300535.5f6a557d@posting.google.com> References: <6a6390b8.0310270433.6b916549@posting.google.com> NNTP-Posting-Host: 62.157.6.85 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1067520950 26397 127.0.0.1 (30 Oct 2003 13:35:50 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 30 Oct 2003 13:35:50 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:1846 Date: 2003-10-30T05:35:50-08:00 List-Id: Duncan Sands wrote in message news:... > > > > Poor compiler has to instantiate a package using a procedure > > whose body it has not yet seen... > > Why should that be a problem? After all, it has all the information it needs > to generate calls to the procedure. > As a layman, I would assume this is the hard part of implementing generics in Ada compilers - it's what sets them apart from simple text substitution robots. >From my personal experience I would still advise against such a usage; it's a test for the compiler when the scenario gets more complicated, in particular when the compiler implements generics with the text expansion approach. --Oliver