-
-
Notifications
You must be signed in to change notification settings - Fork 668
fix Issue 18530 - src/rt/tracegc.d(43): Deprecation: The delete keywo… #7967
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
|
Hmmm, master uses while stable has Which one is the last consensus? |
master. #7947 |
| // 1. Deprecation for 1 year | ||
| // 2. Error for 1 year | ||
| // 3. Removal, "delete" can be used for other identities | ||
| if (!exp.isRAII) |
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.
It's important that when the deprecation period is over, the keyword is removed from the parser. Please add a comment about that here so it doesn't get overlooked.
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.
added "keyword" to the comment.
|
It's also worth noting that once the |
It's my understanding that we want users to be able to use |
Good, that's what I started from, too.
I agree it's not really an issue for tracegc.d, but having to maintain conditional code for different versions and compilers with
Shouldn't the delete declarations (class deallocators) be deprecated now, too? Probably also class allocators? |
…rd has been deprecated defer deprecation message into semantic stage so it can still be versioned out
That's a good point. Maybe we should put
AFAICT they are a relict from D1. |
|
|
Errors in parsers are generally not helpful, as they fail to early and prevent backwards compatible code. So I agree with @rainers here. |
Yes, there is a lot of unfinished business with regard to following through on deprecations. It one of my top priorities, which motivated pushing the the deprecation of I would definitely support deprecating delete declarations (new declarations too?), but they need to go in a separate PR in support of https://dlang.org/deprecate.html#Class%20allocators%20and%20deallocators and a dlang.org PR should be created to properly fill out the deprecations table. |
…rd has been deprecated
defer deprecation message into semantic stage so it can still be versioned out.
Please note that the delete declaration is not deprecated, so the message should probably better say "delete expression" instead of "delete keyword".