home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / edu / 1571 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  3.6 KB

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