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