Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!uupsi!cmcl2!lanl!lambda!jlg From: jlg@lambda.UUCP (Jim Giles) Newsgroups: comp.lang.misc Subject: GOTO vs. pointer vs. assignment (was Re: Relationship between C and C++) Message-ID: <14290@lambda.UUCP> Date: 23 Mar 90 21:41:44 GMT References: <5200059@m.cs.uiuc.edu> Lines: 30 From article <5200059@m.cs.uiuc.edu>, by robison@m.cs.uiuc.edu: > [...] > I think a closer analogy is the following: > > Control flow Data flow > ------------ --------- > label r-value > goto assignment Actually, this analysis is correct. But, the original analogy was also correct. In the domain of data _structuring_ the element corres- ponding to GOTO is the pointer. In the domain of data _flow_ the analogous element is the assignment. > [...] This would lead one to > conclude that any imperative language is "dangerous", whether > it has pointers or not. It not only _would_ lead to such a conclusion - it has (past tense). What do you think all the functional language advocates are on about? Indeed, there is a sense in which assignment leads to some very complicated semantic issues which are completely avoided in functional languages. Fortunately for most of us, people tend to have an intuitive understanding of these semantic problems that makes concern about them somewhat less important. The same goes for GOTO (at least to some extent). In my opinion, the problem is worst for pointers than for either of the other two (people _don't_ seem to understand pointers - intuitively or otherwise). J. Giles