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,3d3f20d31be1c33a X-Google-Attributes: gid103376,public X-Google-Thread: f43e6,2c6139ce13be9980 X-Google-Attributes: gidf43e6,public X-Google-Thread: fac41,2c6139ce13be9980 X-Google-Attributes: gidfac41,public X-Google-Thread: 1108a1,2c6139ce13be9980 X-Google-Attributes: gid1108a1,public From: leew@micrologic.com (Lee Webber) Subject: Re: Interface/Implementation (was Re: Design by Contract) Date: 1997/09/11 Message-ID: <3417f99f.1904249@wizard.pn.com>#1/1 X-Deja-AN: 271600392 References: Organization: Pioneer Global Newsgroups: comp.object,comp.software-eng,comp.lang.ada,comp.lang.eiffel Date: 1997-09-11T00:00:00+00:00 List-Id: On Wed, 10 Sep 1997 09:04:10 -0800, mheaney@ni.net (Matthew Heaney) wrote: > >In article , >stt@houdini.camb.inmet.com (Tucker Taft) wrote: > > >>This may be a practice-versus-capability issue again. There is >>nothing precluding the use of separate declarations, even if the >>subprogram is local to the body. One typical coding style adopted >>for Ada package bodies is: >> >> >> >> >> >> >> >>Given this style, the bodies can be ordered in any way that is convenient. > >Funny, I didn't understand Don's comment, because I thought that everyone >already did this. Patrick Doyle already said the below in one sentence, but I thought I might put a little more mustard on it: So Ada imposes dependency ordering that makes people list their subprograms bottom-up, but everybody defeats this by means of forward declarations and lists things top-down because everybody knows that's the more natural way to read a program. Does anyone see an element of the bizarre in this? I've programmed extensively in Modula-2 and Pascal, and I always thought it was a misfeature that I had to put the main program at the bottom. (Not so true for initialization code for other than the main module.) I've even gone so far as to put all the detail in a subroutine and make the entire main program a call to that routine, just to get it at the top of the source.