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

Capture self explicitly in the capture list and remove it from the body of closures #322

Open
rayfix opened this issue Jun 27, 2020 · 0 comments

Comments

@rayfix
Copy link
Contributor

rayfix commented Jun 27, 2020

With Swift 5.3 you can now leave out self inside of closures of value types. Furthermore it is possible to capture self explicitly. I think the new rule should be to never write self except when it is required for disambiguation. Moreover, a strong capture should be explicitly spelled out in the capture list once. Brevity is achieved without any loss of clarity.

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

No branches or pull requests

1 participant