an old topic (pun intended)

bearophile bearophileHUGS at lycos.com
Thu Oct 27 21:04:31 PDT 2011


Davidson Corry:

> Agreed. In fact, it occurred to me the other day that we could write 
> contracts as
> 
>      void foo(T t)
>      {
>          scope(in) {
>               // pre-condition contracts
>          }
>          scope(out) {
>               // post-condition contracts
>          }
>          // ...body of function...
>      }

How do you replace out(result) with scope(out) {} ?

Bye,
bearophile


More information about the Digitalmars-d mailing list