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: jsa@alexandria.organon.com (Jon S Anthony) Subject: Re: Design By Contract Date: 1997/09/02 Message-ID: #1/1 X-Deja-AN: 269921595 Distribution: world References: Organization: PSINet Newsgroups: comp.lang.ada,comp.lang.eiffel Date: 1997-09-02T00:00:00+00:00 List-Id: In article nospam@thanks.com.au (Don Harrison) writes: > So, if a supplier really needs to restrict what clients can see, for > whatever reason, they're able to. Agreed. Never claimed otherwise. > However, the good thing about Eiffel is that it gives designers the > flexibility of exposing as much or as little of an object's > structure, in contrast with with Ada's you-see-it-all or > you-see-nothing export policy. First, whether or not this is "good" depends on many things. Second, you can play the same game in Ada anyway: package P is type T is limited private; type S1 is tagged record ... end record; type S2 is ... end record; type Whatever is private; function Op1 (X : T) return S1; -- Expose S1 substructure function Op2 (X : T) return S2; -- Expose S2 substructure function Op3 (X : T) return Whatever; -- Don't expose this bit ... private ... end P; Also, even here, you it is possible to get at the remaining hidden structure if it is in the private portion with child packages. So, per usual, at the end of the day there really isn't enough overall differences on which to waste energy... /Jon -- Jon Anthony OMI, Belmont, MA 02178, 617.484.3383 "Nightmares - Ha! The way my life's been going lately, Who'd notice?" -- Londo Mollari