Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!hc!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.lang.fortran Subject: Re: dpANS Fortran 8x Message-ID: <13934@lanl.gov> Date: 12 Jun 89 21:41:49 GMT References: <2716@elxsi.UUCP> Distribution: usa Organization: Los Alamos National Laboratory Lines: 31 From article <2716@elxsi.UUCP>, by corbett@beatnix.UUCP (Bob Corbett): > [...] > Pointers are the most significant addition to the language since the public > review. Pointers made it possible for X3J3 to remove some of the most bizarre > features of the public review version of the language without losing any > functionality. [... The new pointers _DO_NOT_ provide the functionality of the deleted features. Pointers cannot be used to implement either the RANGE attribute or the IDENTIFY statement. This is because pointers can only alias _contiguous_ memory locations - which is an insignificant subset of the capabilities of the two features that have been removed. Not only that, but pointers cause a more significant degradation of code efficiency than RANGE and IDENTIFY would have - so even if pointers _could_ provide the functionality, they are not desireable. Pointers can be used to dynamically allocate memory. But, since ALLOCATABLE variables are retained by the new proposal, ALLOCATABLE remains the prefered method of dynamic memory allocation (no aliasing problems). The only _new_ functionality provided by pointers is the ability to define recursive data structures. But this capability would have been easier to define and implement by _really_ allowing recursive structure (derived type) declarations. I was marginally in favor of pointers at the last 8x review period (mainly to allow recursive data structures). Since studying the issue more thoroughly though, I am convinced that pointers should be included only in _VERY_ low level languages (or, perhaps only systems programming languages). Fortran doesn't need pointers and, in fact, the functionality provided by pointers would be better provided by other means.