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: 103376,3d3f20d31be1c33a X-Google-Attributes: gid103376,public X-Google-Thread: f43e6,2c6139ce13be9980 X-Google-Attributes: gidf43e6,public From: Ken Garlington Subject: Re: Safety-critical development in Ada and Eiffel Date: 1997/07/15 Message-ID: <33CBFCE2.36F@flash.net>#1/1 X-Deja-AN: 257080256 References: Organization: Flashnet Communications, http://www.flash.net Reply-To: keg0@flash.net Newsgroups: comp.software-eng,comp.lang.ada,comp.lang.eiffel Date: 1997-07-15T00:00:00+00:00 List-Id: Don Harrison wrote: > > Jon S Anthony wrote: > > :In article <33C831CE.4E56@flash.net> Ken Garlington writes: > : > :> However, compare and contrast: > :> > :> (ada-ish): type Foo_Type is range 1 .. 10; > :> procedure Do_Something ( X : in Foo_Type ); > :> > :> (Eiffel-ish): procedure Do_Something ( X : in Integer ); > :> require X > 0 and X < 11; > :> > :> Doesn't seem to make a lot of difference to me > : > :That's because there basically isn't any. > > In this case, only by virtue of the fact that in Ada, Integer isn't an extensible > type. Even if it were, you can't inherit the contract. You have to redeclare > it each time you inherit - not very good for maintenance, let alone reliability. Not sure what this means... the "Integer" referred to above would be Eiffel's integer, not Ada's. You can certainly inherit the contract for Foo_Type in Ada. Any types declared based on Foo_Type will inherit the operations defined for it. (Apparently this isn't used a whole lot, but it is available...) > > Don. > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > Don Harrison donh@syd.csa.com.au