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,66bc6b039f1e005d X-Google-Attributes: gid103376,public From: Robert A Duff Subject: Re: Three simple questions Date: 2000/10/16 Message-ID: #1/1 X-Deja-AN: 682099695 Sender: bobduff@world.std.com (Robert A Duff) References: <2BED68CA963D6D55.A78776F656DA0452.75A61ED22116F1B6@lp.airnews.net> <39e2588f.21565740@news.demon.co.uk> <39E2D51E.D0122F20@bton.ac.uk> <8s0b78$2no$1@nnrp1.deja.com> <8s8jmo$qt0$1@nnrp1.deja.com> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 2000-10-16T00:00:00+00:00 List-Id: Robert Dewar writes: > In article , > Kilgallen@eisner.decus.org.nospam (Larry Kilgallen) wrote: > > > If you cannot get programmers to agree on style, you have a > > people problem that cannot be solved with technology. If > > somebody writes Runtime_Exception and someone else writes > > runtime_exception it is not the end of the world. > > No, but it is a bug in my view. And tools can help. I agree. If I define a language, it will be illegal. Of the two, case INsensitivity is better than case sensitivity, because the latter is more error prone. However, a rule that is better than both would be: Overload resolution is case INsenstive. There is a post-name-resolution legality rule that says you have to spell each use with the same casing as the declaration. I believe that's essentially what you get if you use GNAT in the mode where it complains about casing. > What to me is clear is that it is not a good idea to allow > two different identifiers that differ only in casing to > be simultaneously visible. Well, I don't think that's *quite* right. After all, Ada allows two different identifiers to be simultaneously visible even when they are identical -- they don't *even* have to differ in casing. What I would say is that it's a bad idea for the casing of a usage control name resolution. If "foo" were both an acronym and a word, it would be reasonable to have a procedure Foo and a procedure FOO both visible. But I wouldn't want overload resolution to treat them differently. (I can't think of any such words in English right now, but there must be some.) On the other hand, I wouldn't mind a language where I could say: function Capitalize(string: String) return String; where it's clear from the context of use whether we're talking about the parameter or the type. It's not distinguished by case; case would be merely an extra cue. Of course, in Ada, neither parameter names nor type names are overloadable. One thing I find strange is that Ada zealots who very much agree that case sensitivity is a bad idea in programming languages are willing to hand out long tiresome lectures on the spelling of Ada (vs ADA). ;-) I worry that it turns off newcomers, especially in the rare cases where the lecture is rude (eg, "How DARE you criticize Ada when you don't even know how to spell it, you nitwit?!"). - Bob