-
-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix issue 17925 - Mention the old body keyword #1929
Conversation
|
Thanks for your pull request, @bbasile! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Some tips to help speed things up:
Bear in mind that large or tricky changes may require multiple rounds of review and revision. Please see CONTRIBUTING.md for more information. Bugzilla references
|
spec/contracts.dd
Outdated
| On the long term, <code>body</code> could be completely unsupported but for now it's still allowed, | ||
| as a keyword in this context and as an identifier in the function body | ||
| although <code>do</code> must be prefered. | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. Please consider this wordsmithing:
The actual function body starts with do.
In the past, body was used, and could still be encountered in old code bases.
In the long term, body may be deprecated, but for now it's still allowed
as a keyword in this context and as an identifier in the function body, although do is preferred.
|
Yeah i need to add a paragraph but that's not ideal. It looks like because of the style the paragraph will have its own number. |
|
I think this is good now but actually this is for the stable branch. The problem was also that the change was not in the changelog. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add a link to the accepted DIP:
spec/contracts.dd
Outdated
|
|
||
| $(P The actual function body starts with $(D do). | ||
| In the past, $(D body) was used, and could still be encountered in old code bases. | ||
| In the long term, $(D body) may be deprecated, but for now it's still allowed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove 'still'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you state that it will be deprecated. After all, the regarding DIP has been approved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but the problem is not the compiler change, the problem is the documentation that has been brutally changed without a changelog entry, that's the point of the bugzilla report. Even in phobos you still use body.
Excellent point -> dlang/phobos#5869 |
|
Nevermind, that was meant as a reply to dlang/phobos#5869 |
I just want to check the final website output before merging. |
|
yeah, let's wait, i'm not comfy with ddoc, i'm not sure if the changes will be okay. |
Yes, thanks! |

New comers might be confused by the specs, not matching the D code they can read here and there so a note about the syntax explains the situation.