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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC 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: f43e6,2c6139ce13be9980 X-Google-Attributes: gidf43e6,public X-Google-Thread: 103376,3d3f20d31be1c33a X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,2c6139ce13be9980 X-Google-Attributes: gid1108a1,public From: nospam@thanks.com.au (Don Harrison) Subject: Re: Interface/Implementation (was Re: Design by Contract) Date: 1997/09/11 Message-ID: #1/1 X-Deja-AN: 271782473 Sender: news@syd.csa.com.au X-Nntp-Posting-Host: dev50 References: <3416CA7D.50A@link.com> Organization: CSC Australia, Sydney Reply-To: nospam@thanks.com.au Newsgroups: comp.object,comp.software-eng,comp.lang.ada,comp.lang.eiffel Date: 1997-09-11T00:00:00+00:00 List-Id: Sam Mize wrote: [..] :> 2) It's problematic when an exported feature is removed from the :> spec (perhaps because it's erroneously exported) and you have to :> re-order the body to accomodate dependencies. : :You can simply move the procedure specification (the part that :appeared in the spec) to the start of the body, with an :appropriate comment. Agree. :..I've seen well-designed Ada packages where the body starts by :forward-declaring all the internal procedures, so they can use :each other. Agree. :> 3) It's also problematic in the case of mutually recursive types :> and operations. You are forced to pre-declare those that are :> forward referenced. : :This is in fact one of the arguments in FAVOR of dependency :ordering: it prevents accidental mutual recursion, and documents :your intent for maintenance coders. I wonder would accidental mutual recursion usually be obvious because the program would hang (or run out of memory) due to the absence of a termination condition. Alternatively, an assertion might be violated which would draw attention to it. :I find that Ada's dependency ordering provides a useful level :of organization in many cases, and that it is helpful to have :forward declarations as an explicit indication that this ordering :rule is being abandoned. However, that may just be because I'm :used to it. That's probably why the Eiffel convention initially seemed upside down to me at first. :) Don. (Reverse to reply) =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Don Harrison au.com.csa.syd@donh