DIP 1009--Improve Contract Usability--Preliminary Review Round 1

Guillaume Boucher via Digitalmars-d digitalmars-d at puremagic.com
Sun Jun 25 10:04:44 PDT 2017


On Sunday, 25 June 2017 at 15:46:12 UTC, Petar Kirov [ZombineDev] 
wrote:
> out result > 0 // perhaps the best

How would you handle things like this:

T minimum(T)(RedBlackTree!T tree)
in (!tree.empty)
out result in (tree)
{
     return tree.front;
}

That could either mean "out(result){assert(result in (tree));}" 
or out(result){assert(result);} in{assert(tree);}"


More information about the Digitalmars-d mailing list