Invariants for methods

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Nov 18 10:28:39 PST 2010


On 11/18/10 10:12 AM, bearophile wrote:
> Andrei:
>
>> There is a limitation of the current system in that the out contract
>> can't see the scope of the in contract. Walter and I tried to find a
>> solution, but it was technically difficult in the presence of inheritance.
>
> C#4 designers seem to have found a way to implement "old" (Prestate Values) correctly enough, so can't D2 adopt a similar solution?
>
> Bye,
> bearophile

I don't think they have contracts in interfaces, which is where most 
difficulty lies. At any rate, it's not that we can't do it, it was just 
a large effort that we decided to postpone.

Is there anything wrong with the workaround I suggested?


Andrei


More information about the Digitalmars-d mailing list