From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,94d84e4971c0caee X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!u-picardie.fr!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Inheritance with Ada types Date: Tue, 9 Feb 2010 20:47:32 -0600 Organization: Jacob Sparre Andersen Message-ID: References: <92c90b37-0e9b-49f4-ab37-fbd256ed6f06@k41g2000yqm.googlegroups.com> <1d6a685b-c07d-42fa-b8f4-02c74ac70169@u26g2000yqm.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1265770053 22023 69.95.181.76 (10 Feb 2010 02:47:33 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 10 Feb 2010 02:47:33 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5843 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Xref: g2news1.google.com comp.lang.ada:9065 Date: 2010-02-09T20:47:32-06:00 List-Id: "Jean-Pierre Rosen" wrote in message news:tjgrkh.el7.ln@hunter.axlog.fr... > Hibou57 (Yannick Duch�ne) a �crit : >> On 9 f�v, 10:11, Jean-Pierre Rosen 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. I suspect that the "evil" thing here is that the programmer is expecting the use clause to have some effect, but it does not. And that is confusing (although it is the confusing naming that is the real problem, not the presence or absence of the use clause). Randy.