"body" keyword is unnecessary

Tony tonytdominguez at aol.com
Sun Nov 19 04:57:11 UTC 2017


On Saturday, 18 November 2017 at 19:22:25 UTC, Meta wrote:
> On Saturday, 18 November 2017 at 16:21:30 UTC, Eljay wrote:
>> On Monday, 28 March 2011 at 18:59:03 UTC, Walter Bright wrote:
>>> On 3/27/2011 10:35 PM, Jonathan M Davis wrote:
>>>> I'll be _very_ excited to have both the destructor issues 
>>>> and the const issues
>>>> sorted out. They are some of the more annoying quality of 
>>>> implementation
>>>> issues at the moment.
>>>
>>> Yes, I agree those are the top priority at the moment, now 
>>> that we have the 64 bit compiler online and the worst of the 
>>> optlink issues resolved.
>>
>> NECRO ALERT...
>>
>> But I just saw that 
>> https://github.com/dlang/DIPs/blob/master/DIPs/DIP1003.md was 
>> addressed with https://github.com/dlang/dmd/pull/6855 .
>>
>> I, for one, will miss 'body' the keyword.  Now I'll have to 
>> update all my toy code.
>>
>> (Just kidding, I don't mind updating my toy code.  At least it 
>> isn't a codebase the size of Photoshop!)
>
> Don't worry, you've got a few years yet. Currently `body`is not 
> even deprecated; it's become a conditional keyword, or you can 
> use `do` in its place.

It may be deprecated, but someone completely removed it from the 
documentation on contracts. That could cause some confusion for 
people using older versions of the compiler.

https://dlang.org/spec/contracts.html


More information about the Digitalmars-d mailing list