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

[SR-6028] Refactoring to remove unnecessary self when referencing instance members & opposite #48585

Open
swift-ci opened this issue Sep 29, 2017 · 1 comment
Labels
new feature refactoring Area → source tooling: refactoring

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-6028
Radar None
Original Reporter kacperh (JIRA User)
Type New Feature
Additional Detail from JIRA
Votes 0
Component/s Source Tooling
Labels New Feature, Refactoring
Assignee kacperh (JIRA)
Priority Medium

md5: 64a366ab6fea0e30a027695407f8f2a5

Issue Description:

Referencing instance member was thoroughly discussed in SE-009. There are different opinions on this topic and I think we could make a refactoring that will help convert from one style to the other. This will surely help teams to enforce guidelines and make transitions easier. This consists of two refactors:

  • removing unnecessary `self` keywords if the reference to the instance member is unambiguous ( we don't have the same symbol in local scope)

  • adding `self` references in all of the places that are referencing instance members

The most useful would be to have it able to touch multiple files at once, but since it's not available we could limit to the range selected by the user.

@swift-ci
Copy link
Collaborator Author

Comment by KacperHarasim (JIRA)

It's just a pitch right now. If it does make any sense to the other users I would like to implement it. Any thoughts, @nkcsgexi?

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature refactoring Area → source tooling: refactoring
Projects
None yet
Development

No branches or pull requests

1 participant