Improve encapsulation on ERC165 and update code style guide#1379
Conversation
|
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 |
* 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.