🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.fortran
Article #4493

Re: Poor programming (was: Block Data is evil)

#4493
From: J. Giles
Date: Mon, 25 Jan 1993 18:38
30 lines
2156 bytes
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:
|> 
|> >In article <C1AMpC.BAt@umassd.edu> hshubs@cis.umassd.edu (Howard S Shubs) writes:
|> [...]
|> >>You're not seriously suggesting that this be used in production code,
|> >>are you?  If you are, is this intended as job security?
|> 
|> >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.

I agree that the method I wrote is not desirable if an alternative
is available.  This is one of the reasons I dislike C - it handles
pointered arrays almost identically to what I gave.  In fact, as I 
pointed out, with the proper preprocessor you can make the Fortran
version *look* syntactically identical to the C version.  The only
difference would be that Fortran would still have to allocate it's
memory statically (and, in most implementations, you do not really
even have to do that).

Among the things Fortran 90 does correctly are ALLOCATABLE arrays.
Unfortunately, they chose to *also* support pointers.

-- 
J. Giles
Technical Details
Message-ID: <1993Jan25.183843.8227@newshost.lanl.gov>
Path: arc1-ca.pugleaf.net!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
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>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.fortran
Path: arc1-ca.pugleaf.net!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
From: jlg@cochiti.lanl.gov (J. Giles)
Subject: Re: Poor programming (was: Block Data is evil)
Message-ID: <1993Jan25.183843.8227@newshost.lanl.gov>
Sender: news@newshost.lanl.gov
Organization: Los Alamos National Laboratory
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>
Date: Mon, 25 Jan 1993 18:38:43 GMT
Lines: 30