Michel Fortin wrote:
Also, I wonder why we need braces everywhere in contracts. I'd like it
if I could write:
int test(int i)
in
assert(i > 1);
out (z)
assert(z < 0);
do
return -i + 1;
Just bikeshedding a bit around... why not make it even simpler, and just
leave away the body/do completely? That would finally be a syntax I'd be
happy with. It wouldn't destroy the normal code layout too, because
in/out contracts are fully additional syntax.
int test(int i)
in assert(i > 1);
out(z) assert(z < 0);
{ return -i + 1; }