DIP 1003 Formal Review

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Tue May 16 03:28:09 PDT 2017


On Monday, 15 May 2017 at 01:18:02 UTC, Jonathan M Davis wrote:
> So, while I do like the idea of getting the word body back as 
> an identifier, what really appeals to me here is getting rid of 
> the need for it with contracts. And using function instead of 
> body doesn't help that at all.

The purpose of the DIP is to reclaim the keyword. If you want 
shorter contracts, then:

int f(int a)
   in assert(a>0)
   out(r) assert(b==a+1)
{
   return a+1;
}


More information about the Digitalmars-d mailing list