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.7 required=5.0 tests=BAYES_00,MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,447bd1cf7a88c198 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-06 09:40:52 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.infoave.net!arclight.uoregon.edu!news.tufts.edu!blanket.mitre.org!newsfeed.mathworks.com!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: Robert Dewar Newsgroups: comp.lang.ada Subject: Re: Object naming conventions (was: Do we need "Mission-Critical" software?) Date: Sat, 06 Jan 2001 17:30:13 GMT Organization: Deja.com Message-ID: <937kn5$t2f$1@nnrp1.deja.com> References: <3A4F5A4A.9ABA2C4F@chicagonet.net> <3A4F759E.A7D63F3F@netwood.net> <3A50ABDF.3A8F6C0D@acm.org> <92qdnn$jfg$1@news.huji.ac.il> <3A50C371.8B7B871@home.com> <3A51EC04.91353CE7@uol.com.br> <3A529C97.2CA4777F@home.com> <3A53CB9E.EA7CF86C@uol.com.br> <3A5466DE.811D43A5@acm.org> <932aol$ikc$1@nnrp1.deja.com> <932mi6$r2k$1@trog.dera.gov.uk> <9343b1$3g5$1@nnrp1.deja.com> <934iuf$eqv$1@nnrp1.deja.com> <9356q9$ig9$1@trog.dera.gov.uk> NNTP-Posting-Host: 205.232.38.14 X-Article-Creation-Date: Sat Jan 06 17:30:13 2001 GMT X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; U) X-Http-Proxy: 1.0 x51.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 X-MyDeja-Info: XMYDJUIDrobert_dewar Xref: supernews.google.com comp.lang.ada:3709 Date: 2001-01-06T17:30:13+00:00 List-Id: In article <9356q9$ig9$1@trog.dera.gov.uk>, "Kevin Rigotti" wrote: > GNAT is well behaved in its choice of names, for example a > procedure Reset in package Cactus.Random becomes > "cactus__random__reset". Nothing surprising > there. Unfortunately it is not quite that simple. First, overloading obviously introduces additional problems. Second, and more subtly, in Ada 95, it is possible to have two different non-overloadable entities, both of which have the name a.b.c, for example, you can have two variables in a program which have this same fully qualified name. It is an excercise for the reader to figure out how (for the answer see exp_dbug.ads in the GNAT sources). So naming conventions are a little tricky. GNAT goes to great efforts to make the names transparent so that debugging with non-Ada aware debuggers (such as are likely to be available in hardware emulators) is reasonably practical (the other naming scheme would indeed be a bit hostile in this context!). For full details on the GNAT naming scheme, which also includes details of the encodings GNAT uses to present full Ada information using system standard debugging formats, see the source of Exp_Dbug in file exp_dbug.ads. Sent via Deja.com http://www.deja.com/