Communicating between in and out contracts
Lutger
lutger.blijdestijn at gmail.com
Wed Oct 14 13:07:11 PDT 2009
Between sharing the whole object and sharing scope lies specifying exactly
what to share, I'd think.
Here is one possible syntax, like regular function calls. Parameter types
can possibly be inferred and omitted:
void push(T value);
in {
out(length());
}
out(size_t oldLength) {
assert(value == top());
assert(length == oldLength + 1);
}
More information about the Digitalmars-d
mailing list