Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!ames!hc!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.lang.fortran Subject: Re: dpANS Fortran 8x Message-ID: <13946@lanl.gov> Date: 18 Jun 89 21:06:27 GMT References: <1527@uw-entropy.ms.washington.edu> Distribution: usa Organization: Los Alamos National Laboratory Lines: 23 From article <1527@uw-entropy.ms.washington.edu>, by charlie@mica.stat.washington.edu (Charlie Geyer): > [...] > How about C? C pointers point to objects. Pointers that actually > happen to point to the same storage location are not required to > compare equal and so forth. C pointers point to _contiguous_ objects - not to arbitrary ones. Therefore, C pointers are just raw addresses (possibly scaled by some type factor). This is _not_ the model of pointers that I object to (aside from a generl aversion to pointers themselves). > Just out of curiosity, why is this "junk"? You have answered part of that yourself. Pointers to the same location don't compare equal. This makes it hard to implement even run-time tests for aliasing (in case you want to avoid it for optimization purposes). Pointing to arbitrary, non-contiguous, objects would only aggravate this problem (along with others concerning optimization). Higher-level constructs are better - _not_ because they are more powerful, but because they are less so. They apply additional semantic constraints on how the constructs work which are useful to both the programmer and the compiler in producing optimal and correct code.