D's design by contract is missing "old"?

Serg Kovrov kovrov at bugmenot.com
Sun Jun 17 06:52:26 PDT 2007


Russ wrote:
> As far as I can tell, there is no "old" (as in Eiffel) for the function postconditions, which makes them a lot less useful.  "Old" is an essential part of DBC.  The postcondition contract often wants to talk about how the resulting object is different from the original state of the object.  
> E.g. search for "old" on this page:
> http://archive.eiffel.com/doc/manuals/technology/contract/


I have proposed some time ago that 'in' and 'out' could share same 
scope. That way it would be easy to achieve this (and more). 
Unfortunately, no one in NG were showing interest in it.

-- serg.


More information about the Digitalmars-d-learn mailing list