Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!snorkelwacker!usc!cs.utexas.edu!uunet!aplcen!haven!adm!cmcl2!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.lang.fortran Subject: Re: Education for Fortran 90 (was: Fortran 9X replaced by Ada 9X ?) Message-ID: <63470@lanl.gov> Date: 19 Sep 90 21:14:46 GMT References: <142733@sun.Eng.Sun.COM> Organization: Los Alamos Natl Lab, Los Alamos, N.M. Lines: 32 From article <142733@sun.Eng.Sun.COM>, by wsb@boise.Eng.Sun.COM (Walt Brainerd): > [...] > Regarding pointers, the kind J. Giles wants (addresses) were not > put in Fortran 90. By a narrow margin, the X3J3 folks preferred > "descriptors" or "aliases" as the model. Hence one of these things > (call them what you like) can "point to" / "alias" / "reference" > a row or a column of an array (or a two-dimensional part or > a five-dimensional array, or the next element in a linked list, > etc.). Obviously this is useful, even if it is not what > J. Giles wants (and we should have some examples in the book > of pointers to sections of an array!). Actually, this is what I object to - the casual assertion that "Obviously this is useful." It does not give the user any functionality that he doesn't have with array subscript expressions already. What it does is introduce the spectre of aliasing unnecessarily. The committee tried to allay such fears with the "TARGET" attribute, but any two pointers of the same type are still assumed to be aliased - even if they always point into different arrays. In order to avoid this problem, the user will have to use array subscript expressions directly instead of pointing to the section - but this is what the user would have to do even if the pointer-to-section feature didn't exist. So the feature doesn't add anything new. It just adds a "syntactic sugar" notation that users will have to be taught to avoid. The use of pointers should be limited to simulating recursive data structures and the pointer-to-section idea should be deleted from the standard. Now, if they wanted to reintroduce the "ALIAS/IDENTIFY" feature - which really _does_ add functionality - then there would be reason to consider the proposal more seriously. J. Giles