comp.lang.ada
 help / color / mirror / Atom feed
From: Jean-Pierre Rosen <rosen@adalog.fr>
Subject: Re: Inheritance with Ada types
Date: Tue, 09 Feb 2010 12:23:39 +0100
Date: 2010-02-09T12:23:39+01:00	[thread overview]
Message-ID: <tjgrkh.el7.ln@hunter.axlog.fr> (raw)
In-Reply-To: <1d6a685b-c07d-42fa-b8f4-02c74ac70169@u26g2000yqm.googlegroups.com>

Hibou57 (Yannick Duch�ne) a �crit :
> On 9 f�v, 10:11, Jean-Pierre Rosen <ro...@adalog.fr> wrote:
>>> clause... the use clause is particularly evil here.
> With package named Parent, containing a type named Parent, having a
> use clause on Parent brings into a context where the name Package can
> be both resolved as a package or as a type.
> 
> The use clause is clearly involved here, as one the way to get ride of
> this error is to remove the use clause. The other way being to rename
> either the type either the package.
> 
> May be I was wrong to say the use clause is particularly evil there :
> I should have said � the use clause is particularly vicious there
> � (due to its vicious side effect in such a kind of context).
> 
I don't see anything vicious. You have to understand that the use clause
is "weak", it never goes against normal visibility. You have a package
named Parent which is directly visible, a type named Parent which is
use-visible. In this case, the use clause politely gives the way to
direct visibility.

The evil/vicious/whatever is in having nested entities with the same name.

-- 
---------------------------------------------------------
           J-P. Rosen (rosen@adalog.fr)
Visit Adalog's web site at http://www.adalog.fr



  reply	other threads:[~2010-02-09 11:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-09  2:16 Inheritance with Ada types Bryan
2010-02-09  2:57 ` Hibou57 (Yannick Duchêne)
2010-02-09  9:11   ` Jean-Pierre Rosen
2010-02-09 10:19     ` Hibou57 (Yannick Duchêne)
2010-02-09 11:23       ` Jean-Pierre Rosen [this message]
2010-02-10  2:47         ` Randy Brukardt
2010-02-09 10:22     ` Hibou57 (Yannick Duchêne)
2010-02-09 15:08 ` Robert A Duff
2010-02-09 23:39   ` Bryan
replies disabled

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