-
-
Notifications
You must be signed in to change notification settings - Fork 387
Fix Issue 9433 - Deprecate delete #1941
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
Conversation
|
Even though |
|
This is ready for additional scrutiny and potential merge, now that dlang/druntime#2037 is in. |
|
FYI: When I deprecated the hex strings, I removed them from the spec immediately (#2118), which led to an outcry on the forums. |
OK. all the documentation about |
wilzbach
left a comment
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.
There's REF1_ALTTEST too 🏋️♂️
spec/class.dd
Outdated
| $(P The program can explicitly inform the garbage collector that an | ||
| object is no longer referred to (with the delete expression), and | ||
| object is no longer referred to | ||
| (with $(LINK2 phobos/object.html#.destroy, $(D object.destroy()))), and |
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.
`$(REF1 destroy, object)
or if you like the parenthesis sth. like
spec/class.dd
Outdated
| This rule does not apply to auto objects or objects deleted | ||
| with the $(I DeleteExpression), as the destructor is not being run | ||
| This rule does not apply to auto objects or objects destructed | ||
| with $(LINK2 phobos/object.html#.destroy, $(D object.destroy())), |
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.
ditto
spec/expression.dd
Outdated
| $(D delete) $(GLINK UnaryExpression) | ||
| ) | ||
| $(P NOTE: `delete` has been deprecated. Instead, please use $(REF1 destroy, object) | ||
| if feasible, or $(REF __delete, core, memory) as a last resort) |
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.
End with .?
|
Anyone know what's causing this error in DAutoTest? |
| $(P The program can explicitly inform the garbage collector that an | ||
| object is no longer referred to with $(REF1 destroy, object), and | ||
| then the garbage collector calls the destructor immediately. The | ||
| destructor is guaranteed to never be called twice. |
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.
Missing parenthesis here.
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.
The parens is there on the next line: 639.
Yeah, it's the universally beloved DDoc system - it throws no error on trailing parenthesis, but LaTeX will. |
|
Ah that's the real issue: Fix: #2194 |
|
Thanks to @wilzbach this is now passing and is ready for additional scrutiny, and potentially a merge. |
|
Ping. The DMD PR has been merged, and this really needs to go in along with it for the next release. |
|
@andralex or whoever can act on this. This needs to go in with the other, already merged, PRs. |
wilzbach
left a comment
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 typically don't merge spec PRs until @andralex or @WalterBright have given their approval, but as @JinShil pointed out this sat too long in the queue. We need to be able to move faster.
|
Cool, thanks. |
Spec and documentation update to accompany dlang/dmd#7342