DIP 1003 Formal Review

via Digitalmars-d digitalmars-d at puremagic.com
Sun May 14 06:57:25 PDT 2017


On Sunday, 14 May 2017 at 13:55:44 UTC, Steven Schveighoffer 
wrote:
> On 5/14/17 9:24 AM, Petar Kirov [ZombineDev] wrote:
>>
>> By making body optional and a contextual keyword there should 
>> be no
>> breaking changes (except for obscure code like `static assert
>> (!__traits(compiles, { mixin ("int body;"); }))` :D).
>
> It doesn't even need to be optional. It can be required as it 
> is now (when in/out are specified), just not a keyword. I 
> believe that this is what is specified in Option 1 of the DIP.
>
> -Steve

Yeah, I'm OK with Option 1. I would just prefer not typing 'body' 
when writing functions with contracts.


More information about the Digitalmars-d mailing list