home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.edu:1571 comp.lang.fortran:3471
- Path: sparky!uunet!engcon!rodgers
- From: rodgers@engcon.marshall.ltv.com (KMRODGERS)
- Newsgroups: comp.edu,comp.lang.fortran
- Subject: Case Sensitivity (was Re: Small Language Wanted)
- Message-ID: <999@engcon.marshall.ltv.com>
- Date: 8 Sep 92 14:57:00 GMT
- References: <DAVIS.92Aug23010605@pacific.mps.ohio-state.edu> <1992Aug25.034553.2990@linus.mitre.org> <1992Aug25.104211.1@vxdesy.desy.de>
- Reply-To: rodgers@engcon.UUCP (KMRODGERS)
- Organization: LTV MEG, Dallas, TX
- Lines: 50
-
- In article <1992Aug25.104211.1@vxdesy.desy.de> pawlak@vxdesy.desy.de writes:
- [much quote and reply on the neverending Fortran vs C rwar deleted]
- > . . . And about 70% of the C code I had to work with was
- >badly written because of:
- [deleted]
- >- making use of case sensitivity (i.e. symbols 'value' and 'Value' in the
- > same program)
-
-
- I hate contributing to this particular religious warfare (hence the changed
- Subject: line), but I think that case sensitivity, WHEN PROPERLY USED, is
- (IMHO) a Good Thing. The simple case cited above shows the bad features of
- case sensitivity, but sometimes case is relevant to the problem domain.
- Example: most of my work involves air vehicle stability and control
- (Advertisement!), and I find myself constantly having to write equations of
- motion routines for various analysis tools. For s&c, several quantities
- known as aerodynamic stability derivatives are used. These are represented
- in handwritten or typeset form as as capital "C" followed by various upper
- and lowercase subscripts. The case of the subscript is important! E.g.,
- cap "C" sub "L" is lift coefficient, while cap "C" sub "l" is rolling moment
- coefficient -- two drastically different quantities. It is most convenient
- and readable (at least to an s&c engineer, and nobody else could/would have
- an interest in these particular codes) to directly translate these in my
- code(s) as CL and Cl, respectively. In the absence of case sensitivity,
- I must make do with CLIFT and CRM, or something similar. Sometimes, even the
- case of the initial "C" is important. If I am, say, predicting lift on a
- wing, it is even worse, for then I have a quantity known as section lift
- coefficient, represented by (lowercase) "c" sub "l"; representing this in
- non-case-sensitive systems (and, as I must often do, staying strictly F77
- with 6-char variable names) would lead to something like CSECTL. For me
- (and, I would venture, most other aerodynamicists and s&c engineers), writing
- the three above quantities in our computer codes as CL, Cl, and cl is much more
- readable (and a direct translation of the mathematical symbolism) than the
- case-insensitive alternative, especially when working in the strict confines
- of F77. (yes, I know that any Fortran which was case-sensitive would almost
- certaintly have long variable names, but IMHO it's still more readable mixed
- case.)
-
- If one of the goals of a computer language, especially one for scientific
- and engineering computation, is to try to preserve as much as possible
- and reasonable the natural notations of these fields (a claim that I have
- heard Jim Giles make before, and one with which I agree), then I think that
- case sensitivity is important, and this is _one_ area where C is superior to
- Fortran. (Note the emphasis; I make no other claims in this rwar.)
-
- ------------------------------------------------------------------------------
- Kevin Rodgers Loral Vought System Co. rodgers%engcon@uunet.uu.net
- Since LTV no longer has Ling, Temco, or Vought, I suggest they change
- their name to MBSC (Mostly Bankrupt Steel Company).
- ------------------------------------------------------------------------------
-