On Saturday, 24 June 2017 at 02:31:09 UTC, Solomon E wrote:
I think my proposal to add another use of semicolon in parentheses, like `foreach` or `for` but not the same as either, was needlessly complicated.

in (a)
out (result) (a)

as syntax sugar where each (a) lowers to
{assert(a);}
and in future can lower to something else, to renovate contract implementation

That's so much easier, in every way.

Another option is to allow giving a name to a function's return value in its signature, so something like:

        int result myFunc(Args...)(Args args)
        if (Args.length > 1)
        in (args[0] > 0)
        out (result > 10);

This is the approach taken by Dafny, which was mentioned earlier in the thread. Can't say I like it.

Reply via email to