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: fac41,2c6139ce13be9980 X-Google-Attributes: gidfac41,public X-Google-Thread: 1108a1,2c6139ce13be9980 X-Google-Attributes: gid1108a1,public X-Google-Thread: 103376,3d3f20d31be1c33a X-Google-Attributes: gid103376,public X-Google-Thread: f43e6,2c6139ce13be9980 X-Google-Attributes: gidf43e6,public From: doylep@ecf.toronto.edu (Patrick Doyle) Subject: Re: Interface/Implementation (was Re: Design by Contract) Date: 1997/09/08 Message-ID: #1/1 X-Deja-AN: 270610367 X-Nntp-Posting-Host: skule.ecf Sender: news@ecf.toronto.edu (News Administrator) References: <340C85CE.6F42@link.com> Organization: University of Toronto, Engineering Computing Facility Newsgroups: comp.object,comp.software-eng,comp.lang.ada,comp.lang.eiffel Date: 1997-09-08T00:00:00+00:00 List-Id: In article , Robert Dewar wrote: > >Though this technical point is completely irrelevant to the main thread >of discussoin here, if you are saying that you should be able to use entities >before they are declared. I strongly disagree. Sure my compiler can make >multiple passes through a source document, but as a human reading the >document, I prefer not to. There is a reason why we arrange text books, >and other materials not to have forward references (such as mentioning >a character in a novel before introducing them). Programs benefit in the >same way from a basically linear approach, in which overall understanding >can be obtaineed in a single linear pass. Novels and program code are read in fundamentally different ways. Program code is a reference text, more like a dictionary than a novel. If you look up a word in a dictionary and it uses another word you don't know, do you care whether this new word is before the first word? Of course not. IMO, the idea that code is read linearly is a misconception. Perhaps the spec might be read linearly if a programmer is new to that package and wants to immerse himself in it and learn it all at once. This usage is analogous to the usage of a text book, and perhaps dependency ordering provides some nominal assistance here. Other than this particular usage, it's my experience that code is not read linearly, so dependency ordering is addressing a non-issue, especially in the package body. -PD -- -- Patrick Doyle doylep@ecf.utoronto.ca