comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: Tool to expand generics?
Date: 1995/04/18
Date: 1995-04-18T00:00:00+00:00	[thread overview]
Message-ID: <dewar.798251343@gnat> (raw)
In-Reply-To: 3n1jtk$a0v@Starbase.NeoSoft.COM

It is not at all easy to do accurate source expansion of generics. If it
were, then generics would be easy to compile, and they are not :-(

For example, calls that are unambiguous in the template may look ambiguous
in expanded source when you obliterate the distinction between actual and
formal subtypes. 

Similarly (Ada 95) expressions in the template that are legal but will
raise CE, may become illegal in the expanded source because the values
are outside the base range of the actual generic type.

<fill in LOTS more cases here if you ever implemented generics>

Generics are NOT macros!





       reply	other threads:[~1995-04-18  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3mu3bs$ptf@sequoia.jrs.com>
     [not found] ` <3n0t9c$24k@sequoia.jrs.com>
     [not found]   ` <3n113i$fg6@pulsar.sky.net>
     [not found]     ` <3n1jtk$a0v@Starbase.NeoSoft.COM>
1995-04-18  0:00       ` Robert Dewar [this message]
1995-04-19  0:00       ` Tool to expand generics? Jon Spear
replies disabled

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