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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8d472879e3f609e0 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-04 12:26:37 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: jimmaureenrogers@worldnet.att.net (Jim Rogers) Newsgroups: comp.lang.ada Subject: Re: Case sensitivity (was Re: no title) Date: 4 Jun 2003 12:26:37 -0700 Organization: http://groups.google.com/ Message-ID: <82347202.0306041126.7e9b0e97@posting.google.com> References: <1054647054.761122@master.nyc.kbcfp.com> <1054651042.211055@master.nyc.kbcfp.com> <0egDa.45243$fT5.9340@nwrdny01.gnilink.net> <82347202.0306040546.34773e3@posting.google.com> <1054736576.85233@master.nyc.kbcfp.com> NNTP-Posting-Host: 209.194.156.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1054754797 32672 127.0.0.1 (4 Jun 2003 19:26:37 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 4 Jun 2003 19:26:37 GMT Xref: archiver1.google.com comp.lang.ada:38638 Date: 2003-06-04T19:26:37+00:00 List-Id: Hyman Rosen wrote in message news:<1054736576.85233@master.nyc.kbcfp.com>... > Jim Rogers wrote: > > Strictly speaking, acronyms are not English. They are technical > > terms relating to a narrow discipline. > > And programs are full of technical terms relating to the > narrow discipline in which they are working. So you make > my point for me. I do not see how this makes your point. Most acronyms are commonly used with only upper case notation. For instance, one I am dealing with is AFSCN. There is no acronym in the same domain with the same letters but a different mixture of case. For such acronyms case sensitivity is no advantage, since AFSCN and afScn must refer to the same acronym. The use of upper case is a convention rather than a requirement. Making a case-sensitive distinction between AFSCN and afScn would only compound confusion. In an Ada program I would expect values corresponding to an acronym to be defined as enumeration values. Variables should not be named after an acronym. Acronyms have a constant value. Variables have variable values. Acronyms map more correctly to enumeration values in Ada and C++, or constants in either language, than to variables. Is it considered good style to have functions with the following names all in the same C++ program: Main MAIN mAin MaIn I do not believe this is considered a good coding style. Why not? It takes full advantage of case sensitivity, which C and C++ deem good. The problem is that the function "main" has a very special role in a C or C++ program. Similarly named functions can be confusing to the maintainer of the program. Of course, the compiler has no problem distinguishing between the different symbols. Coding style issues always deal with problems for the reader and maintainer of the code. Case sensitivity was left out of Ada to prevent the kind of overloading of symbols that causes clear confusion. Common Ada development environments will enforce case consistency for neatness. The difference between this and requiring case sensitivity is that in Ada this is merely a coding style issue. In C++ it becomes a coding style and syntax issue. The compiler may have a different opinion of the meaning of an identifier than does the human reader of the code. Such differences of opinion can be problematic. Jim Rogers