comp.lang.ada
 help / color / mirror / Atom feed
From: "Mark Lundquist" <up.yerz@nospam.com>
Subject: Generics not overloadable
Date: Wed, 28 Nov 2001 17:44:47 GMT
Date: 2001-11-28T17:44:47+00:00	[thread overview]
Message-ID: <jo9N7.89153$XJ4.48822848@news1.sttln1.wa.home.com> (raw)

Generic units cannot be overloaded.

That is a bother.

Apparently this is to allow for a name denoting a generic_declaration,
occurring within the generic_formal_part of the same generic_declaration, to
denote the generic unit itself [AARM 8.6(18b)].

Questions:

1) Do I understand this correctly (that this is the reason generics are not
overloadable)?

2) Of what use is a name denoting a generic unit within its own formal part?
You certainly can't instantiate the generic there.  What else can you bloody
well do with a generic unit (in general) besides instantiate it?

3) In any case, why could overloading rules not just as well apply to
generic unit names both outside the generic and within the formal parts?

4) Is there anything else that could be done to fix this (make generics
overloadable)?

And now some questions for the language lawyers (these are "help me get to
know my RM better" questions):

5) I could not actually find the rule covering resolution of a generic unit
name denoting a generic_declaration within the unit's own formal part.
There are a couple of rules that refer to such a rule, but where's the
actual rule?  I was looking for a Name Resolution Rule somewhere, like in
12.1...

6) The aforementioned paragraph in the AARM says that the rule in question
"implies" that generics are not overloadable.  It certainly stands to reason
that generics cannot be overloaded in light of such a rule, but I took
"implies" in the technical sense: that is, that this rule in combination
with some other rules entails the result.  What would those other rules be?

Thanks,
Mark Lundquist
http://members.home.com/mlundquist2/consulting






             reply	other threads:[~2001-11-28 17:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-28 17:44 Mark Lundquist [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-11-28 21:10 Generics not overloadable Mark Lundquist
2001-11-28 21:29 ` Ted Dennison
2001-11-29  3:41   ` Robert Dewar
2001-11-29  5:49     ` R. Tim Coslet
2001-12-09 14:05     ` Mark Lundquist
2001-12-10 16:15       ` Stephen Leake
2001-11-29 10:41 ` Ian Wild
2001-11-29 19:10   ` Mark Lundquist
2001-11-30 22:38     ` Nick Roberts
replies disabled

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