Skip to content
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

revert deprecation of scope class #15380

Merged
merged 1 commit into from
Jul 12, 2023
Merged

Conversation

WalterBright
Copy link
Member

See #13767

This is another one where the scope class doesn't actually hurt anything.

I suggest with things like this that do not actually hurt anything that we just accept them and keep them doing what they do without complaint. We can perhaps add a switch -obsolete which will tell the user about use of such obsolete features.

See also: #15379 and deprecating class alias this.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#15380"

@WalterBright
Copy link
Member Author

Or maybe a -wo switch, which will emit warnings about obsolete features.

@rikkimax
Copy link
Contributor

rikkimax commented Jul 4, 2023

These features should still be removed at some point. I would like to one day use body for instance.

However, a separate warning that dub turns on by default? Sure, I like that idea.

@WalterBright
Copy link
Member Author

You can already use body as an identifier, this doesn't turn it off.

@adamdruppe
Copy link
Contributor

good.

@tgehr
Copy link
Contributor

tgehr commented Jul 4, 2023

Nice! TBH I don't really see why this should even be considered obsolete. It's nice to be able to declare a class whose destructor has to be called reliably, the check is very cheap, and the syntax is intuitive.

@WalterBright WalterBright reopened this Jul 12, 2023
@WalterBright WalterBright merged commit 087f752 into dlang:master Jul 12, 2023
@WalterBright WalterBright deleted the scopeClass branch July 12, 2023 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants