Re: a history question

From: James Giles (jamesgiles_at_worldnet.att.net)
Date: 09/28/04


Date: Tue, 28 Sep 2004 21:59:20 GMT

beliavsky@aol.com wrote:
...
> (3) The changing role of POINTERs in the language seems a little funny to
> me. In Fortran 90/95 POINTERs can be used in structure components and in
> procedure arguments in places where ALLOCATABLE arrays cannot be, but in
> the F95 technical reports and the F2003 standard these restrictions are being
> removed, and ALLOCATABLE arrays will be preferred for these uses (IMO). In
> F2003 POINTERs will still be useful in referring to array sections, but this
> seems like a minor issue, and I'm not sure what the other uses of POINTERs
> will be.

I'm convinced that pointers to array slices are a mistake, so
pointers should be irrelevant when the new features of
ALLOCATABLEs are available. F8x (the proposed
version preceeding the F90 language that was eventually
adopted) didn't have pointers and did allow much of what
finally is being allowed in F2003 for ALLOCATABLEs.
I made the mistake of criticising F8x on that basis. I'm
now convinced that F8x was on the right track. (In fact,
it was the arcane and still problematical POINTER
feature that F90 came out with that convinved me.)

-- 
J. Giles
"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies."   --  C. A. R. Hoare


Relevant Pages

  • Re: Allocatable vs pointer in procedure resolution
    ... >>between the signatures of, for instance, ... > with both allocatable arrays and pointers. ... I'm writing library routines, and I want the user to be able to ... reallocate both POINTER and ALLOCATABLE arrays. ...
    (comp.lang.fortran)
  • Re: a history question
    ... and ALLOCATABLE arrays will be preferred for these uses. ... >>F2003 POINTERs will still be useful in referring to array sections, ... > finally is being allowed in F2003 for ALLOCATABLEs. ... 'self-referential' derived types, ...
    (comp.lang.fortran)
  • Re: bug with ifort + openmp : allocatable array not allocated after allocation
    ... Meanwhile I have re-written the code using pointers, ... Allocatable arrays are always better for optimization. ... User communities for Intel Software Development Products ... Intel Fortran Support ...
    (comp.lang.fortran)
  • Re: Dynamic vector allocation
    ... this case the pointers and targets. ... In Fortran 90 or later, you can use ALLOCATABLE arrays. ...
    (comp.lang.fortran)
  • Re: ALLOCATABLE or POINTER
    ... by the language designer. ... It may be that pointers are overused, ... (though I've done both with allocatable arrays and indices). ... no deficiencies and the other way is to make it so complicated ...
    (comp.lang.fortran)