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.

Reply via email to