home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / fortran / 5153 < prev    next >
Encoding:
Text File  |  1993-01-24  |  2.6 KB  |  52 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!gatech!hubcap!jtbell
  3. From: jtbell@hubcap.clemson.edu (Jon Bell)
  4. Subject: Re: Poor programming (was: Block Data is evil)
  5. Message-ID: <1993Jan24.021752.2657@hubcap.clemson.edu>
  6. Organization: Presbyterian College, Clinton SC
  7. References: <C1AMpC.BAt@umassd.edu> <1993Jan23.151052.6593@hubcap.clemson.edu> <C1BEIn.8MA@umassd.edu>
  8. Date: Sun, 24 Jan 1993 02:17:52 GMT
  9. Lines: 41
  10.  
  11. In article <C1BEIn.8MA@umassd.edu> hshubs@cis.umassd.edu (Howard S Shubs) writes:
  12. >In <1993Jan23.151052.6593@hubcap.clemson.edu> jtbell@hubcap.clemson.edu (Jon Bell) writes:
  13. >
  14. >>It's already been done.  When I was a grad student in experimental
  15. >>particle physics, I worked with CERN's HYDRA library, which implemented
  16. >>dynamic memory allocation in FORTRAN using the same basic idea.  I 
  17. >>think this package is still widely used in particle physics.
  18. >
  19. >That's meaningless.  Just because something has been done poorly is not
  20. >a reason to continue to do it poorly.  Someone has to maintain that code.
  21.  
  22. The CERN HYDRA package first appeared in the late 60's, I think.  Its goal
  23. was to provide linked data structures and dynamic memory management in
  24. the context of standard Fortran (at that time, Fortran 66) so that it could
  25. be run on as many platforms as possible.  Particle physicists work in large
  26. collaborations, on a wide variety of computers, and source-code
  27. portability is important to them.  
  28.  
  29. In in ideal world, I suppose the best solution would have been to migrate
  30. to another language which had built-in support for dynamic memory allocation.
  31. But at the time, I don't think there _was_ any other suitable language.
  32. Algol was basically used only in Europe.  PL/I was used mostly on IBM
  33. machines.  C and Pascal hadn't even been invented yet!
  34.  
  35. Now, of course, we _do_ have widely-used languages which have dynamic 
  36. memory allocation, but physicists still love Fortran, and there's an awful
  37. lot of code out there.
  38.  
  39. Actually, HYDRA was pretty well documented.  Most of the problems in using
  40. it were the standard conceptual ones involving linked data structures and
  41. dynamic memory management, dangling pointers and the like.  And since it
  42. was a very widely used package, you could always find somebody who 
  43. understood it and its coding conventions.  Maintenance wasn't _that_ big
  44. a problem.
  45.  
  46. I certainly wouldn't recommend this approach nowadays for a new software
  47. system.  If it needed dynamic memory allocation, I'd say, "Use C... or
  48. Pascal... or maybe Fortran 90.  Don't even think about doing it in 
  49. Fortran 77."  But for its time, HYDRA was the only possible solution.
  50.  
  51. Jon Bell / Dept. of Physics & C.S. / Presbyterian College / Clinton SC   
  52.