Michiel Helvensteijn wrote:
Pete wrote:

I think this is much more elegant:

# int foo(int a) {
#    in {
#       assert(a>2);
#    }
#
#    return a-1;
# }

I have to disagree. That suggests that 'in' is a scope within the body,
which would have access to its local variables. Of course, it shouldn't.

If you make 'in' clauses 'pure' (which they are, conceptually), it works fine.

I agree with Pete, I think that's a greatly superior syntax to what we have now.


Reply via email to