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-Thread: 103376,1b41412c7bc28c47 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!x16g2000prn.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Suffix _T for types found good Date: Wed, 20 Aug 2008 13:37:03 -0700 (PDT) Organization: http://groups.google.com Message-ID: <2259e1a3-e04c-4662-affb-dae07baa4a43@x16g2000prn.googlegroups.com> References: <2e9ebb23-a68b-43cf-8871-febcb173f951@56g2000hsm.googlegroups.com> <4899d2af$0$19731$4d3efbfe@news.sover.net> <9LmdncTBAPGV5jbVnZ2dnUVZ_sTinZ2d@comcast.com> <37793f2b-2cc6-4aba-856e-cbfe503872a5@v16g2000prc.googlegroups.com> <1xqborx4epefc.11z7g8cmj4nlp.dlg@40tude.net> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1219264623 360 127.0.0.1 (20 Aug 2008 20:37:03 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 20 Aug 2008 20:37:03 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: x16g2000prn.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:7422 Date: 2008-08-20T13:37:03-07:00 List-Id: On Aug 20, 8:38 am, "Dmitry A. Kazakov" wrote: > On Wed, 20 Aug 2008 07:25:12 -0700 (PDT), Adam Beneschan wrote: > > Yeah, earlier on in this thread I was thinking about whether it would > > have been possible for Ada to have separate namespaces for types and > > other non-type entities without ambiguities. Attributes make this > > impossible. > > Nope. In all cases the type and variable names can be overloaded. Any > difference between them is not lexical. Apparently I didn't make myself clear, since we seem to be talking about two totally different things. Either that, or I just don't understand what you're saying. Let me try to make myself clearer: If there were a rule change in Ada so that types (or subtypes) could have the same identifiers as other entities in the same scope, in many or most cases the compiler could unambiguously determine from context whether the identifier refers to the type: XYZ : Some_Type; type XYZ is array (1..10) of Some_Other_Type; An_Object : XYZ; In this last line, it's clear that only the type declaration could be meant by XYZ. But in attribute cases, it can be ambiguous: XYZ'First, XYZ'Last, XYZ'Size, probably some others. So that aspect of the language would need a new design. I'm not sure whether there are other cases, besides attributes, where the identifier would be ambiguous. -- Adam