Communicating between in and out contracts

Walter Bright newshound1 at digitalmars.com
Fri Oct 16 02:55:36 PDT 2009


Rainer Deyke wrote:
> Andrei Alexandrescu wrote:
>> Eiffel offers the "old" keyword that refers to the old object in a
>> postcondition. But it seems quite wasteful to clone the object just to
>> have a contract look at a little portion of the old object.
> 
> You don't need to clone the whole object.  You just need to cache the
> properties that are used with 'old'.

That's a good idea.



More information about the Digitalmars-d mailing list