RFC: Value range propagation for if-else

bearophile via Digitalmars-d digitalmars-d at puremagic.com
Wed Jun 18 10:00:34 PDT 2014


Lionello Lunesu:

> Will play with it.

And later you look at other things, like post-conditions:


int foo()
out(result) {
     assert(result >= 0 && result <= ubyte.max);
} body {
     return 10;
}
void main() {
     ubyte x = foo();
}


And slowly D Contract Programming starts to become a grown-up 
language feature.

Bye,
bearophile


More information about the Digitalmars-d mailing list