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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,911abff935bc47c X-Google-Attributes: gidfac41,public X-Google-Thread: 103376,63a41ccea0fc803a X-Google-Attributes: gid103376,public From: nospam@thanks.com.au (Don Harrison) Subject: Re: Naming of Tagged Types and Associated Packages Date: 1998/08/07 Message-ID: #1/1 X-Deja-AN: 378736140 Sender: news@syd.csa.com.au X-Nntp-Posting-Host: dev7 References: Organization: CSC Australia, Sydney Reply-To: nospam@thanks.com.au Newsgroups: comp.lang.ada,comp.lang.eiffel Date: 1998-08-07T00:00:00+00:00 List-Id: Brian Rogoff wrote (in com.lang.ada): :On Wed, 5 Aug 1998, Don Harrison wrote: :> Matt Heaney wrote: :> :> :In an Ada declaration, the object and the type can't have the same name. :> :If the object is called File, then the type has to be called something :> :else. (Note that Eiffel doesn't have this "problem," because the object :> :and its type are in different namespaces.) :> :> I think it's not so much namespaces but the fact that the syntax allows :> you (and the compiler) to easily differentiate variables (entities in :> Eiffel parlance) from types. : :Well, I hate to agree with my mortal enemy Matthew :-), It's easy to make a friend of an enemy when arguing with an even greater "enemy". :) :"but for this to be :correct it would have to be the case that Ada syntax doesn't allow you to :differentiate types and variables in the analogous Ada constructs. No. That's a necessary, but not sufficient, condition. It's also necessary that the compiler actually *uses* this semantic information to disambiguate. In the case of Eiffel, it does; in the case of Ada, it doesn't. :at least for your examples, this is obviously not true. So Matthew's point :stands, it is the separate namespaces, not the syntax, that allows you to :use the same names for types and variables. Your inference is wrong due to a false assumption. :I find that very ugly, but I'm :sure if I used Eiffel long enough my abhorence would diminish. If I continue to use Ada, my abhorence of having to (unecessarily) invent different names will remain. :) Don. Don Harrison donh at syd.csa.com.au