-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Improve encapsulation on ERC165 and update code style guide #1379
Improve encapsulation on ERC165 and update code style guide #1379
Conversation
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.
Then it is also the case for |
I agree with @nventuro. We are trying to make all our state variables private. However, for ERC165 we would need to ask ourself what would this mean with relation to the ERC specification. If we make this state variable private, are we deviating from the expected interface? |
The only difference that migration from internal to private makes is impossibility to deregister interfaces. Also From the ERC specification point of view it seems like nothing is changed. |
@ZumZoom you're right, but that is an unintended side effect of the current implementation: if we want to support deregistering, we should provide a method to explicitly do it. I'd go for |
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.
Thanks for taking care of this @ZumZoom! Little fixes like this one help the whole project be more cohesive :)
* use prefix underscore for internal state variables * make _supportedInterfaces private (cherry picked from commit 03dfb29)
Following #1282 the same prefix underscoring rules should apply to the internal state variables as to the internal functions. Luckily it is already applied in most cases.