comp.lang.ada
 help / color / mirror / Atom feed
From: okellogg@freenet.de (Oliver Kellogg)
Subject: Re: Actual subprogram and generic instantiation in same unit
Date: 30 Oct 2003 05:35:50 -0800
Date: 2003-10-30T05:35:50-08:00	[thread overview]
Message-ID: <6a6390b8.0310300535.5f6a557d@posting.google.com> (raw)
In-Reply-To: mailman.227.1067260813.25614.comp.lang.ada@ada-france.org

Duncan Sands <baldrick@free.fr> wrote in message news:<mailman.227.1067260813.25614.comp.lang.ada@ada-france.org>...
> >
> > 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



      reply	other threads:[~2003-10-30 13:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-27 12:33 Actual subprogram and generic instantiation in same unit Oliver Kellogg
2003-10-27 13:20 ` Duncan Sands
2003-10-30 13:35   ` Oliver Kellogg [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox