Coming From /
Eiffel
No "old" operator for function postconditions
Unfortunately D lacks Eiffel's "old" or any equivalent mechanism for the postcondition ("out") statements to refer to the original value which "this" had at the start of the function call.
Full Design By Contract includes a way to compare the object's values at the start and end of the function invocation, which is often necessary in order to define what the function does to the object. ( http://archive.eiffel.com/doc/manuals/technology/contract/ gives further discussion of this element of DBC.)
Thus something like
|
Related
- Languages vs. D
- D Transition Guide
- Feature List
- Rosetta Code: D category
- Language Specification
- Development with D