RFC: Value range propagation for if-else
Meta via Digitalmars-d
digitalmars-d at puremagic.com
Wed Jun 18 12:54:02 PDT 2014
On Wednesday, 18 June 2014 at 17:00:36 UTC, bearophile wrote:
> 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
This could be a bad thing. It makes it pretty enticing to use
contracts as input verification instead of logic verification.
More information about the Digitalmars-d
mailing list