My body is ugly [Re: Contextualizing keywords]

Michiel Helvensteijn m.helvensteijn.remove at gmail.com
Mon Aug 3 02:59:07 PDT 2009


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.

-- 
Michiel Helvensteijn




More information about the Digitalmars-d mailing list