DIP 1003 Formal Review

Meta via Digitalmars-d digitalmars-d at puremagic.com
Tue May 16 05:50:37 PDT 2017


On Tuesday, 16 May 2017 at 10:28:09 UTC, Kagamin wrote:
> 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;
> }

Yes, please keep the discussion focused on the the removal of 
`body` and how to best go about that. I do agree though that we 
could and should make contracts shorter. Maybe in another DIP 
after this one.


More information about the Digitalmars-d mailing list