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

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!agate!dog.ee.lbl.gov!hellgate.utah.edu!lanl!cochiti.lanl.gov!jlg
  3. From: jlg@cochiti.lanl.gov (J. Giles)
  4. Subject: Re: Poor programming (was: Block Data is evil)
  5. Message-ID: <1993Jan25.183843.8227@newshost.lanl.gov>
  6. Sender: news@newshost.lanl.gov
  7. Organization: Los Alamos National Laboratory
  8. References: <1993Jan21.074755.14939@arcetri.astro.it> <1993Jan22.183106.15813@newshost.lanl.gov> <C1AMpC.BAt@umassd.edu> <1993Jan23.151052.6593@hubcap.clemson.edu> <C1BEIn.8MA@umassd.edu>
  9. Date: Mon, 25 Jan 1993 18:38:43 GMT
  10. Lines: 30
  11.  
  12. In article <C1BEIn.8MA@umassd.edu>, hshubs@cis.umassd.edu (Howard S Shubs) writes:
  13. |> In <1993Jan23.151052.6593@hubcap.clemson.edu> jtbell@hubcap.clemson.edu (Jon Bell) writes:
  14. |> 
  15. |> >In article <C1AMpC.BAt@umassd.edu> hshubs@cis.umassd.edu (Howard S Shubs) writes:
  16. |> [...]
  17. |> >>You're not seriously suggesting that this be used in production code,
  18. |> >>are you?  If you are, is this intended as job security?
  19. |> 
  20. |> >It's already been done.  When I was a grad student in experimental
  21. |> >particle physics, I worked with CERN's HYDRA library, which implemented
  22. |> >dynamic memory allocation in FORTRAN using the same basic idea.  I 
  23. |> >think this package is still widely used in particle physics.
  24. |> 
  25. |> That's meaningless.  Just because something has been done poorly is not
  26. |> a reason to continue to do it poorly.  Someone has to maintain that code.
  27.  
  28. I agree that the method I wrote is not desirable if an alternative
  29. is available.  This is one of the reasons I dislike C - it handles
  30. pointered arrays almost identically to what I gave.  In fact, as I 
  31. pointed out, with the proper preprocessor you can make the Fortran
  32. version *look* syntactically identical to the C version.  The only
  33. difference would be that Fortran would still have to allocate it's
  34. memory statically (and, in most implementations, you do not really
  35. even have to do that).
  36.  
  37. Among the things Fortran 90 does correctly are ALLOCATABLE arrays.
  38. Unfortunately, they chose to *also* support pointers.
  39.  
  40. -- 
  41. J. Giles
  42.