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,411186037d1bc912 X-Google-Attributes: gid103376,public From: Laurent.Guerby@enst-bretagne.fr (Laurent Guerby) Subject: Re: Some questions about Ada. Date: 1996/05/06 Message-ID: <4xd94iotqc.fsf@leibniz.enst-bretagne.fr>#1/1 X-Deja-AN: 153267228 distribution: world sender: guerby@leibniz.enst-bretagne.fr references: content-type: text/plain; charset=US-ASCII organization: Telecom Bretagne mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-05-06T00:00:00+00:00 List-Id: Richard Kenner writes [talking about casing] : A counterexample to that, with which I mostly agree, are some C coding : conventions where the kind of thing is determined by the casing of the : first letter. I've seen this sort of thing in the sources of some CAD : systems. For example: : : typedef struct wire {...} Wire; : typedef struct signal {...} Signal; : : I've also seen this done with macros that call functions vs the function : they, internal and external versions of a function, etc. : : I think this can be a very useful convention if it is followed : uniformly. I can't offhand think of an Ada analog for such a : convention, though. For this kind of macros, the Ada equivalent is Inline (standard since the good old days ;-) and a good compiler : nightmare for a few compiler writers, easy and maintainable for zillions of users, sounds like the optimal scheme in language design for me (IMHO, but there's of course counter arguments, like time to market a compiler, but I think the Ada world is not the same than in the eighties and has taken into account previous mistakes and experiences). For the useful casing convention, from a safety point of view, it's hard to rely on a single letter for such a semantic gap. IMHO, just adding a _Type if no good name can be found is better (I've not said "the best") and safer. But I agree that if strictly everybody on a large project agree on such a uniform convention, it can work. This is not common case. On the mathematical side, I've seen a lot of stupid but hard to find mistakes (including my own ones ;-) introduced by the convention "x" "X" "i" etc ... For my own calculus I started to use longer indices (i_something), so when I discovered Ada, I was very happy to type five more characters a few times instead of spending hours reading obscure things to find a typo. I've choosen to agree with case-insensitivity for programming languages on the same basis, and I don't rely a priori on casing for meaning. -- -- Laurent Guerby, student at Telecom Bretagne (France), Team Ada. -- "Use the Source, Luke. The Source will be with you, always (GPL)." -- http://www-eleves.enst-bretagne.fr/~guerby/ (GATO Project). -- Try GNAT, the GNU Ada 95 compiler (ftp://cs.nyu.edu/pub/gnat).