comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Interesting containers problem.
Date: Tue, 21 Apr 2015 10:06:23 +0200
Date: 2015-04-21T10:06:23+02:00	[thread overview]
Message-ID: <17apiyy7txazx.15t3uckthh5b7$.dlg@40tude.net> (raw)
In-Reply-To: mh42ob$5kp$1@loke.gir.dk

On Mon, 20 Apr 2015 18:39:54 -0500, Randy Brukardt wrote:

> What you are talking about would help in an antique language that doesn't 
> support any overloading, but I would hope that people in this group are 
> beyond that. :-)

We could introduce "checked use" as compared the "unchecked" one Ada has.
The difference would be that if "use P" would hide anything in the scope
the language would require explicit renaming. E.g.

package P is
   X : Integer;
end P;

package Q is
   X : Integer;
end Q;

not overriding use P, Q; -- Illegal
package R is
   ...
end R;

not overriding use P, Q with Y renames Q.X; -- That's OK
package R is
   -- X means P.X
   -- Y means Q.X
   ...
end R;

The same keyword could be used with the keywords introducing a declaration
scope (e.g. "declare") to ensure that any declarations in that scope hiding
anything will be rejected.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

  parent reply	other threads:[~2015-04-21  8:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-17 13:42 Interesting containers problem Shark8
2015-04-17 19:12 ` Peter Chapin
2015-04-17 20:45   ` Randy Brukardt
2015-04-17 21:06     ` Dmitry A. Kazakov
2015-04-18 17:21     ` Shark8
2015-04-19 17:10       ` brbarkstrom
2015-04-20 23:39       ` Randy Brukardt
2015-04-21  3:05         ` Randy Brukardt
2015-04-21  8:06         ` Dmitry A. Kazakov [this message]
2015-04-21  8:28           ` J-P. Rosen
2015-04-21  8:45             ` Dmitry A. Kazakov
replies disabled

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