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

Add using keyword for resource management #3128

Closed
mnordine opened this issue Jun 2, 2023 · 2 comments
Closed

Add using keyword for resource management #3128

mnordine opened this issue Jun 2, 2023 · 2 comments
Labels
feature Proposed language feature that solves one or more problems

Comments

@mnordine
Copy link
Contributor

mnordine commented Jun 2, 2023

It'd be really nice to have something like the using keyword from C#. Looks like it's being considered for JavaScript, and there's a decent review here.

Looks like TypeScript is adding it as well.

I guess this would mean introducing a Disposable interface in the standard lib, and implementing it for relevant classes.

@mnordine mnordine added the feature Proposed language feature that solves one or more problems label Jun 2, 2023
@julemand101
Copy link

Sounds like a duplicate of: #2051

@mnordine
Copy link
Contributor Author

mnordine commented Jun 2, 2023

I thought it may have already existed, but search didn't reveal anything, closing.

@mnordine mnordine closed this as completed Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Proposed language feature that solves one or more problems
Projects
None yet
Development

No branches or pull requests

2 participants