From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4b06f8f15f01a568 X-Google-Attributes: gid103376,public From: Mark A Biggar Subject: Re: Software landmines (was: Why C++ is successful) Date: 1998/08/25 Message-ID: <35E2FC29.954D706C@lmco.com>#1/1 X-Deja-AN: 384628204 Content-Transfer-Encoding: 7bit References: <6rnh8p$dno$1@nnrp1.dejanews.com> <$3XHNBAxSZ41Ew4G@dowie-cs.demon.co.uk> <35E1E74D.AF98CE26@lmco.com> Content-Type: text/plain; charset=us-ascii Organization: Lockheed Martin Western Development Labs Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-08-25T00:00:00+00:00 List-Id: Martin Dowie wrote: > In article <35E1E74D.AF98CE26@lmco.com>, Mark A Biggar > writes > >Yes, there is, Pointers are the data structure equivelant of the goto statement. > >Multiple aliases can get you into worse trouble then goto's any day. > >At least a goto has an explisitly labeled target, while in most languages > >a variable with multiple aliaes has no marking what-so-ever. Note, that > >Ada is one of the few languages that requires such marking with the > >"aliased" keyword. > but the data structures that 'jacksonites' refer to are > the 'real world' ones eg. a report might consist of > a title page, plus a contents page, plus an iteration > of text pages plus an iteration of index pages. Yes but even that description may contain what are efectively pointers, what do you think goes in the bibliography end the end of the document. And, what is a URL but a pointer. > also, can't see who you equate a pointer to a goto. eg > type ptr is access ...; > type rec is record > int:integer; > my_ptr:ptr; > end record; But, that's a controlled use of pointers, just like "return" and "exit" are controlled uses of "goto". It's cases like the following where pointers are like uncontrolled goto's: type ptr is access all integer; X: aliased integer; Y: ptr := X'ACCESS; or even worse Y: ptr := X'UNCHECKED_ACCESS; -- Mark Biggar mark.a.biggar@lmco.com > > here, the point forms part of a sequence. the thing > a pointer points to itself has a specific structure > which can be descibed in terms of sequences, selections > and iterations. i would have thought a better equivilant > of a pointer would be a subprogram. > > anyway, suffice to say that 'jacksonites' tend to be the > biggest 'goto-phobes' in any office. > -- > Martin Dowie