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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,38fc011071df5a27 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-31 11:57:27 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newshub.sdsu.edu!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!harp.news.atl.earthlink.net!not-for-mail From: Richard Riehle Newsgroups: comp.lang.ada Subject: Re: Ideas for Ada 200X Date: Sat, 31 May 2003 11:59:20 -0700 Organization: AdaWorks Software Engineering Message-ID: <3ED8FB88.4233154E@adaworks.com> References: <6a90b886.0305262344.1d558079@posting.google.com> <3ED3CCAE.C8733E2C@somewhere.nil> <8K-cnfftnpLd5UijXTWcrg@gbronline.com> Reply-To: richard@adaworks.com NNTP-Posting-Host: 3f.bb.68.a4 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Server-Date: 31 May 2003 18:57:26 GMT X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:38236 Date: 2003-05-31T18:57:26+00:00 List-Id: Robert A Duff wrote: > More importantly, a typical Ada program has hundreds of integer types, > so putting "i" at the front of variable names doesn't tell you much of > anything interesting. In fact, we can put the type in front of a value using attribute notation for disambiguation. For example, type Signal is (Red, Yellow, Green); type Color is (Red, Orange, Yellow, Green, Blue, Indigo, Violet); ------------------- for I in Red..Green loop ... end loop; will be ambiguous when Red through Green are both directly visible. Instead, we might code, for I in Signal'Red .. Signal'Green ... end loop; The language does not prevent me from using this notation even when it is unnecessary. So, if you really want to do something equivalent to Hungarian notation, go ahead. However, it is usually quite superfluous. Richard Riehle Oh, and I do realize there are better ways to lay out the code in my example, but the example is intended to illustrate a different point than good coding practice. RR