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: f43e6,2c6139ce13be9980 X-Google-Attributes: gidf43e6,public X-Google-Thread: fac41,2c6139ce13be9980 X-Google-Attributes: gidfac41,public X-Google-Thread: 103376,3d3f20d31be1c33a X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,2c6139ce13be9980 X-Google-Attributes: gid1108a1,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: Interface/Implementation (was Re: Design by Contract) Date: 1997/09/13 Message-ID: #1/1 X-Deja-AN: 272211783 Sender: news@inmet.camb.inmet.com (USENET news) References: <34196B5F.458F@link.com> Followup-To: comp.object,comp.software-eng,comp.lang.ada,comp.lang.eiffel X-Nntp-Posting-Host: houdini.camb.inmet.com Organization: Intermetrics, Inc. Newsgroups: comp.object,comp.software-eng,comp.lang.ada,comp.lang.eiffel Date: 1997-09-13T00:00:00+00:00 List-Id: Samuel Mize (smize@link.com) wrote: : ... : It's about the claim that "dependency ordering" increases human : comprehension of a package or subprogram. If we in Ada usually : defeat the default dependency ordering, for clarity, that's : hardly a stellar recommendation for its ability to increase human : comprehension. Putting in a separate spec is not "defeating" anything. Either the spec or the body of a subprogram must precede any use of it in Ada (and Pascal and Modula and C++ and ...). For both the human and the compiler's point of view, just the spec is all you need. It is only if you are too lazy to write both a spec and a body that you push the reader into "backwards" reading. The point of this "dependency ordering" is that *declarations* precede use, so the reader and the compiler know the meaning of what they are reading, in advance of reading it. There is no need for bodies to precede use, and in fact, you and others have pointed out that always trying to have bodies precede use is 1) awkward to read, and 2) impossible in the presence of recursion. : ... : Sam Mize -- -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ Intermetrics, Inc. Burlington, MA USA