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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,60e2922351e0e780 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-20 00:23:32 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!tar-atanamir.cbb-automation.DE!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: Clause "with and use" Date: Thu, 20 Nov 2003 09:26:31 +0100 Message-ID: References: <_rGsb.39$pv1.0@read3.inet.fi> NNTP-Posting-Host: tar-atanamir.cbb-automation.de (212.79.194.116) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 1069316611 59178937 212.79.194.116 (16 [77047]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:2711 Date: 2003-11-20T09:26:31+01:00 List-Id: On Wed, 19 Nov 2003 12:46:23 -0500, "Warren W. Gay VE3WWG" wrote: >Dmitry A. Kazakov wrote: > >> On Mon, 17 Nov 2003 11:42:45 -0500, "Warren W. Gay VE3WWG" >> wrote: >> >>>Dmitry A. Kazakov wrote: >>> >>>>On Fri, 14 Nov 2003 09:51:33 -0500, "Warren W. Gay VE3WWG" >>>> wrote: >>>> >>>>>Dmitry A. Kazakov wrote: >>>>> >>>>>>On Thu, 13 Nov 2003 12:51:51 -0500, "Warren W. Gay VE3WWG" >>>>>> wrote: >>> >>>... >>> >>>>There should be something wrong with the language, if the following is >>>>illegal: >>>> >>>>with Ada.Io_Exceptions; >>>>package A is >>>> End_Error : exception renames Ada.Io_Exceptions.End_Error; >>>>end A; >>>> >>>>with Ada.Io_Exceptions; >>>>package B is >>>> End_Error : exception renames Ada.Io_Exceptions.End_Error; >>>>end B; >>> >>>This is more sillyness. When you USE both packages, you take >>>a hierarchical name space and flatten it. So what else would >>>you expect if there were clashes? >> >> >> I expect renaming be renaming. So A.End_Error and B.End_Error should >> not clash in any context. Compare it with : >> >> package A is >> X : Integer; >> end A; >> >> with A; >> package B renames A; >> >> with A; use A; >> with B; use B; >> procedure Test is >> begin >> X := 1; -- This is OK >> end Test; >> >> This example illustrates the fact that package renaming *is* a >> renaming. >> >> The example with End_Error shows that object renaming is something >> very different. > >OK, I see where you're going with this now. I did overlook >the renames clause. I don't have an issue with this myself, >given that the "ending point" refers to the same thing. > >While resolving this specific issue would help, it would not >resolve the general problem with other name clashes. I suppose there could be much less name clashes if object renaming be true renaming and if types could be renamed instead of dubious "subtype X is Y;" Further, if all types would be tagged, then almost all non-class-wide operations would be primitive. So instead of a plethora of overloadings we would have overridings, which do not clash. Further, if multiple dispatch would be supported, then many cases of class-wide subprograms would become primitive operations and again name clashes would disappear. -- Regards, Dmitry Kazakov http://www.dmitry-kazakov.de