On Monday, 15 May 2017 at 01:39:34 UTC, MysticZach wrote:
Not that a whole new way of doing things is called for... but I think a better design would have been to allow 'in' and 'out' statements in the function itself, with no need for brackets if you only have one line's worth of contract, e.g.,

int fun(int a) {
  in assert(...);
  out(x) assert(...);

  // do stuff
}

You could even accumulate in statement if you want to save on brackets and indentation:
int fun() {
  in assert(...);
  in assert2(...);

  // etc.
}

Reply via email to