Xref: utzoo comp.object:3731 comp.lang.eiffel:1667 Newsgroups: comp.object,comp.lang.eiffel Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!mstr!mstr!jcm From: jcm@mstr.hgc.edu (James McKim) Subject: Re: Functions without side effects (was Old confusion) Message-ID: <1991Jun17.141842.25702@mstr.hgc.edu> Sender: Usenet@mstr.hgc.edu (Action News Central) Nntp-Posting-Host: sc3.hgc.edu Reply-To: jcm@mstr.hgc.edu (James McKim) Organization: The Hartford Graduate Center, Hartford CT. References: <130242@tut.cis.ohio-state.edu> <1991Jun5.072556.19870@irisa.fr> <1991Jun5.083241.13145@tkou02.enet.dec.com> <956@puck.mrcu> <1186@tetrauk> Date: Mon, 17 Jun 91 14:18:42 GMT In article <1186@tetrauk.UUCP> rick@tetrauk.UUCP (Rick Jones) writes: > >Wait for Eiffel version 3! (not long now, I hope). Second that (e)motion! And where/how can I get the latest _Eiffel: The Language_ ASAP? > It will support a construct >"strip" which means "the attributes of this object, except for given to strip>". If there are no parameters, it is all the attributes. Then >the postcondition "strip = old strip" means "no change". Since strip allows >you to explicitly omit specified attributes, you can write a postcondition >which means "no change to any attributes except those specified". So by >omitting attributes which only affect internal state, the postcondition can >ensure that the important things are unchanged, even though the internal state >may have been modified. > Hmmm. Is "strip" included in the public interface? Offhand, it seems it should _not_ be since, if I understand correctly, it may include parameters that are private attributes. These the client does not need/want to see and, besides, the public interface should not change if I change the name of a private attribute. Also "strip" wouldn't help with public attributes that change, since the client needs to know _how_ each such attribute changes, not just which ones may. It _does_ look like a very useful compiler directive, though.... >-- >Rick Jones, Tetra Ltd. Maidenhead, Berks, UK rick@tetrauk.uucp >Chairman, NICE (Non-profit International Consortium for Eiffel) > >Any fool can provide a solution - the problem is to understand the problem -- Jim *------------------------------------------------------------------------------* Jim McKim (203)-548-2458 _Give_ people fish and they eat for a day. Internet: jcm@mstr.hgc.edu _Teach_ people to fish and they eat for a lifetime.