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,a50a3c40267219cc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-22 13:27:12 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!newspeer.monmouth.com!news.monmouth.com!shell.monmouth.com!not-for-mail From: ka@sorry.no.email (Kenneth Almquist) Newsgroups: comp.lang.ada Subject: The caselessness is one of the things I like best! Date: 22 Oct 2001 16:27:02 -0400 Organization: A poorly-installed InterNetNews site Message-ID: <9r1vem$3uq$1@shell.monmouth.com> References: <3105e154.0110150021.32ff5426@posting.google.com> <9qeg5r$266$1@trog.dera.gov.uk> <9qei6k$3hj$1@newstoo.ericsson.se> NNTP-Posting-Host: shell.monmouth.com Xref: archiver1.google.com comp.lang.ada:15047 Date: 2001-10-22T16:27:02-04:00 List-Id: "Petter Fryklund" wrote: > If the only difference between two entities is the case, I think the > program will be very hard to maintain. Not if you have an appropriate naming convention. For example, in a case sensitive variant of Ada you might write: package CAR is -- package names are upper case type Car is private; -- type names begin with an uppercase letter function current_speed(car : Car) return Speed; -- other names are lower case end CAR; You might ask about the risk that people will confuse, say, "car" with "CAR". First, while English is often case insensitive, my experience is that people can learn to pay attention to case with a little effort. Ada programmers appear to have no problem distinguishing between "Ada" and "ADA". Second, the case differences are normally redundant: only one of "CAR" and "car" will make sense in a particular context. As far as the compiler is concerned, we could replace "CAR" and "car" with "Car" and "Car" because the name resolution code in the compiler should never make a mistake. Writing "CAR" and "car" rather than "Car" and "Car" does help the human reader (once the human reader has spent some time learning the convention) because it provides additional redundancy which reduces the probability of human error. Of course, since Ada is case insensitive, we don't have long arguments over which names should use which casing. So I think that the decision to make Ada case insensitive does have the benefit of leading to a more tranquil comp.lang.ada. :-) Kenneth Almquist