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

Manfred Nowak svv1999 at hotmail.com
Mon Jun 18 12:43:25 PDT 2007


Russ Williams wrote

> but if it means the programmer has to write explicit code to do
> it, that's not the good way to do it... 

I described how `old' might be implemented.

You described that not being forced to write explicit code only holds 
in trivial cases.

The non trivial cases need more work to be done. In terms of 
information hiding a construct like `old( clone( a))' seems horrible.

So:
1) What is the right way to have a smooth transition from implicit to 
explicit coding?
2) Is explicit coding the `old' pattern even possible without breaking 
some OO-requirements?

-manfred


More information about the Digitalmars-d-learn mailing list