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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,63a41ccea0fc803a X-Google-Attributes: gid103376,public From: Brian Rogoff Subject: Re: Naming of Tagged Types and Associated Packages Date: 1998/08/05 Message-ID: #1/1 X-Deja-AN: 378211953 References: Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: 902335199 17175 bpr 206.184.139.132 Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-08-05T00:00:00+00:00 List-Id: 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 :-), 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. 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. I find that very ugly, but I'm sure if I used Eiffel long enough my abhorence would diminish. -- Brian