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,f66d11aeda114c52 X-Google-Attributes: gidfac41,public X-Google-Thread: 103376,f66d11aeda114c52 X-Google-Attributes: gid103376,public From: rodemann@mathematik.uni-ulm.de (Joerg Rodemann) Subject: Re: Design By Contract Date: 1997/09/02 Message-ID: <340bb873.0@news.uni-ulm.de>#1/1 X-Deja-AN: 269674670 References: Followup-To: comp.lang.ada,comp.lang.eiffel Organization: University of Ulm, SAI, Germany Newsgroups: comp.lang.ada,comp.lang.eiffel Date: 1997-09-02T00:00:00+00:00 List-Id: Don Harrison (nospam@thanks.com.au) wrote: > The thing is, though, that the designer of the supplier class *intends* the > client to see the structure of attributes in just the same way as the author > of an Ada interface *intends* clients to see the structure of a value > returned > by a function. > Exporting happens on a need-to-know basis. If clients need attributes for > any purpose (including efficiency tuning), then the supplier exports them. > If they don't, then the supplier keeps them hidden. Note that in the > extreme > case of an attribute whose underlying class exports none of its attributes, > you have the equivalent to an Ada private attribute. That is, the Ada I wonder what this is all about? In Ada as well as in Eiffel you have to decide if you grant a client read, read/write or none access to any member variables of an object. Certainly the syntax of the following implementations differ --- and in this case tend to need a few more characters in the Ada version. Although there is a slight difference: in Ada you arrange one or more 'class' definitions in a package whereas the feature mechanism of Eiffel reminds me a little bit of the friend declarations in C++. (Sorry if I got this wrong, I just had a short glance at Eiffel yet.) But at least I do not recognize any fundamental difference between the explicit declaration of a function and the possibility to use a member variable as if it was a function. (As far as I remember there is some construct in Ada where a similar interpretation is used. Perhaps someone else has a better memory than me...must have been digging up too many memory problems in C++ lately ;-> ) I occurs to me that the differences this thread is all about start from a slight difference in writing. (You use more words to say this, so mine is better. As in while ( cond ) { while cond loop ... vs. ... } end loop; Well, of course just my opinion Yours Joerg -- rodemann@mathematik.uni-ulm.de | Dipl.-Phys. Joerg S. Rodemann Phone: ++49-(0)711-5090670 | Flurstrasse 21, D-70372 Stuttgart, Germany -------------------------------+--------------------------------------------- rodemann@rus.uni-stuttgart.de | University of Stuttgart, Computing Center Phone: ++49-(0)711-685-5815 | Visualization Department, Office: 0.304 Fax: ++49-(0)711-678-7626 | Allmandring 30a, D-70550 Stuttgart, Germany