home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / edu / 1410 < prev    next >
Encoding:
Internet Message Format  |  1992-08-30  |  5.6 KB

  1. Xref: sparky comp.edu:1410 comp.lang.fortran:3283 comp.lang.misc:2806 comp.arch:9094 sci.math:10701
  2. Path: sparky!uunet!destroyer!gatech!rutgers!cbmvax!jesup
  3. From: jesup@cbmvax.commodore.com (Randell Jesup)
  4. Newsgroups: comp.edu,comp.lang.fortran,comp.lang.misc,comp.arch,sci.math
  5. Subject: Re: Scientists as Programmers (was Re: Small Language Wanted)
  6. Message-ID: <34742@cbmvax.commodore.com>
  7. Date: 30 Aug 92 00:18:29 GMT
  8. References: <1992Aug25.154501.8654@colorado.edu> <1992Aug26.192410.6523@ultb.isc.rit.edu> <1992Aug27.154823.583@alchemy.chem.utoronto.ca> <BtpAIn.EE5@mentor.cc.purdue.edu>
  9. Reply-To: jesup@cbmvax.commodore.com (Randell Jesup)
  10. Organization: Commodore, West Chester, PA
  11. Lines: 93
  12.  
  13. hrubin@pop.stat.purdue.edu (Herman Rubin) writes:
  14. >>>>what you are seeing is not that FORTRAN lends itself to rotten code,
  15. >>>>but that scientists usually write bad code, in whatever language they
  16. >>>>use. No offense to scientists, but I have rarely if ever seen a
  17. >>>>scientist who was a good programmer.
  18.  
  19. >>     Edward wasn't trying to insult anyone.  He correctly identified the
  20. >>source of the problem:  Scientists think that any code that executes
  21. >>correctly and quickly is OK.  What it looks like and whether it would
  22. >>meet with the approval of CS weanies is completely irrelevant
  23. >>to us.  Of course, that also means that our "one-shot" code had better
  24. >>never need to be tweaked.
  25.  
  26.     I think whoever wrote that last paragraph is quite correct.  One
  27. should also remember that scientists are programmers of necessity: they
  28. program because they have to, not because they're good at it or (generally)
  29. like to do it.  This certainly doesn't improve the quality of the code,
  30. let alone the maintainability...
  31.  
  32. >They concentrate on what no scientist is particularly worried about, like
  33. >making the printed output look neat, or even making life easy for the
  34. >compiler.
  35.  
  36.     So?  That's a lot of why they exist.  They weren't created solely to
  37. make life easier for physicists.  (Not that that's an invalid thing to do -
  38. but your statement implies that all else is unimportant.)
  39.  
  40. >  They talk about optimizing compilers, but when someone brings
  41. >up something which the current styles of optimization do not handle, they
  42. >still say that the programmer must not be allowed to intervene with the
  43. >product of the compiler, and things must be left to the compiler.
  44.  
  45.     Intervening in compiler output (as you call it) is at best dangerous,
  46. doubly so for someone whose training isn't in software.  With highly optimising
  47. compilers, when wading through compiler output I'll often say "that move is
  48. useless", and then find out 50 instructions later it was highly useful.  With
  49. heavily pipelined processors it's easy to produce subtle bugs, since things
  50. don't always happen in the order they appear to from the list of instructions.
  51. Etc.  If you need to write in assembler, do so, don't try to sneak behind
  52. the back of other tools - you'll save yourself a lot of grief.
  53.  
  54. >The ideas of those
  55. >who make extensive use of the computer for number theory, for example, are
  56. >entirely ignored by both the hardware people and the language people. 
  57.  
  58.     And what are these?  I've never heard a suggestion from these people
  59. (I think); give examples (and make them apply to more than just number-
  60. theory research).
  61.  
  62. > And
  63. >it is almost official policy to make the use of machine language other than
  64. >through the inadequate high level languages at least very difficult.
  65.  
  66.     It's mainly difficult because programming in assembler is fundamentally
  67. more difficult - that's why we invented higher-level languages.  It's also
  68. more difficult on most architectures because few people do it, therefore few
  69. people bother to write better tools.  Processors that are primarily programmed
  70. in ASM, such as the AT&T DSP3210, have very readable assembler syntax (for
  71. an assembler) - it almost reads like C.
  72.  
  73. >Fortran is inadequate, Algol is inadequate, C, and even C++, is inadequate.
  74. >Even if a programmer can find a good way of mixing them, there is no
  75. >possibility of having one line in Fortran and the next in C. 
  76.  
  77.     I don't even want to _think_ about how hard that would be to deal
  78. with...  There is a lesser alternative: link functions from different
  79. languages together.  If you want to be really sick, make each line a "function"
  80. and use some sort of preprocessor to build it by compiling each separately.
  81. I don't think you'd be pleased with the results, though.
  82.  
  83. >Most good scientists can think of their problem, and how reasonable operations
  84. >can attack it.  But the languages do not facilitate this, and often even if 
  85. >the features are present, they are in some obfuscated syntax.  Handling the
  86. >syntax problem alone would make for great improvement, but I see nothing in
  87. >this direction, and have asked for software to do this single job.
  88.  
  89.     Not every language is appropriate for every job, which is what I
  90. think people told you last time this came up.  If there are specific problems,
  91. give examples.  Also, I suspect that a large part of it is that (not
  92. suprisingly) scientists don't want to learn N languages, they want a kitchen-
  93. sink that does it all, AND they want it to be simple, AND they want it to
  94. generate the tightest code theoretically possible.  This is like the old
  95. cliche: fast, small, soon, pick any 2.  Those requirements are pretty close
  96. to contradictory (certainly wanting all of them will greatly increase to
  97. cost to produce any such compiler, if it can be done at all).
  98.  
  99. -- 
  100. "Rev on the redline, you're on your own; seems like a lifetime, but soon it's
  101.  gone..."  Foreigner
  102. -
  103. Randell Jesup, Jack-of-quite-a-few-trades, Commodore Engineering.
  104. {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com  BIX: rjesup  
  105. Disclaimer: Nothing I say is anything other than my personal opinion.
  106.