Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!joyce!sri-unix!quintus!ok From: ok@quintus.uucp (Richard A. O'Keefe) Newsgroups: comp.lang.fortran Subject: Re: Pointers in FORTRAN 8X Message-ID: <513@quintus.UUCP> Date: 7 Oct 88 07:01:01 GMT References: <7306@well.UUCP> <3@microsoft.UUCP> Sender: news@quintus.UUCP Reply-To: ok@quintus.UUCP (Richard A. O'Keefe) Organization: Quintus Computer Systems, Inc. Lines: 24 In article <3@microsoft.UUCP> bobal@microsoft.UUCP (Bob Allison (uunet!microsoft!bobal)) writes: >I've decided to try to present the proposal going around X3J3 for pointers >(which is in the language WG-5 is demanding, I believe). Thank you. >So, if you want >to copy the contents of one structure pointed to by "P" to another structure >pointed to by "Q", you write "P=Q"; if you want "P" to point to what "Q" >points to, you write "P=>Q". Oh dear oh dear oh dear. Simula 67 had the same idea (the operators were := and :-) but the thing which saved Simula was that for a given P and Q only one of the operators was legal. The difference between two statements with such different effects should _not_ be a single character. In C, which I do not for a moment claim is ideal, the distance between the statements is two characters: *P = *Q; -vs- P = Q; and in ADA the difference is 8 characters: P.all := Q.all; -vs- P := Q; And then to make the operation look as though it assigns P to Q! We've had enough discontent expressed in comp.lang.c with the fact that mistyping P==Q (a comparison) may yield a valid expression P=Q to indicate that single-character errors are alive and well (and of course Bliss programmers know this to their cost). When will we learn?