From: Laurent.Guerby@enst-bretagne.fr (Laurent Guerby)
Subject: Re: Some questions about Ada.
Date: 1996/05/06
Date: 1996-05-06T00:00:00+00:00 [thread overview]
Message-ID: <4xd94iotqc.fsf@leibniz.enst-bretagne.fr> (raw)
In-Reply-To: Dqt9nA.o5n@undergrad.math.uwaterloo.ca
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).
next prev parent reply other threads:[~1996-05-06 0:00 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-05-02 0:00 Some questions about Ada Carl Laurence Gonsalves
1996-05-02 0:00 ` Dave Jones
1996-05-03 0:00 ` Carl Laurence Gonsalves
1996-05-03 0:00 ` Robert A Duff
1996-05-03 0:00 ` Dave Jones
1996-05-03 0:00 ` Adam Beneschan
1996-05-04 0:00 ` Robert Dewar
1996-05-04 0:00 ` Richard Kenner
1996-05-04 0:00 ` Robert Dewar
1996-05-05 0:00 ` Richard Kenner
1996-05-05 0:00 ` Robert Dewar
1996-05-04 0:00 ` Robert A Duff
1996-05-04 0:00 ` Robert Dewar
1996-05-05 0:00 ` Robert A Duff
1996-05-05 0:00 ` Arthur Evans Jr
1996-05-05 0:00 ` Robert Dewar
1996-05-05 0:00 ` Robert Dewar
1996-05-06 0:00 ` Norman H. Cohen
1996-05-06 0:00 ` David Weller
1996-05-07 0:00 ` Robert Dewar
1996-05-12 0:00 ` Geert Bosch
1996-05-06 0:00 ` Christopher J. Henrich
1996-05-04 0:00 ` Kevin D. Heatwole
1996-05-06 0:00 ` Norman H. Cohen
1996-05-06 0:00 ` Robert Dewar
1996-05-04 0:00 ` Carl Laurence Gonsalves
1996-05-03 0:00 ` Michael Feldman
1996-05-06 0:00 ` Laurent Guerby [this message]
1996-05-03 0:00 ` Darren C Davenport
1996-05-03 0:00 ` Spencer Allain
1996-05-06 0:00 ` Matthew M. Lih
1996-05-09 0:00 ` Dave Jones
1996-05-02 0:00 ` Robert A Duff
1996-05-03 0:00 ` Laurent Guerby
1996-05-03 0:00 ` Robert A Duff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox