Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!dino!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!robison From: robison@m.cs.uiuc.edu Newsgroups: comp.lang.misc Subject: Re: Relationship between C and C++ Message-ID: <5200059@m.cs.uiuc.edu> Date: 23 Mar 90 01:30:48 GMT References: <8432@hubcap.clemson.edu> Lines: 27 Nf-ID: #R:hubcap.clemson.edu:8432:m.cs.uiuc.edu:5200059:000:929 Nf-From: m.cs.uiuc.edu!robison Mar 22 10:11:00 1990 /* Written 2:31pm Mar 21, 1990 by mccarrol@topaz.rutgers.ed in comp.lang.misc*/ > > Unrestrained pointers are the data structures equivalent of > uncontrolled GOTOs. A language like C that lets you do anything > in the world that you please with pointers is very similar to a > language like BASIC that lets you arbitrarily jump to anyplace you > want to in your code. Sure, there's a lot of power in that! But > there's a lot of unnecessary "danger". I think a closer analogy is the following: Control flow Data flow ------------ --------- label r-value goto assignment To see the connection, observe what control flow does to the program counter (instruction pointer). This would lead one to conclude that any imperative language is "dangerous", whether it has pointers or not. Arch D. Robison University of Illinois at Urbana-Champaign UUCP: {pur-ee,convex}!uiucdcs!robison Internet: robison@CS.UIUC.EDU