-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Remove 'external' functions #2162
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frangio
reviewed
Mar 30, 2020
Co-Authored-By: Francisco Giordano <[email protected]>
frangio
reviewed
Apr 2, 2020
frangio
reviewed
Apr 2, 2020
frangio
approved these changes
Apr 2, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The goal behind making every function overrideable (
virtual
) is to, well, allow for overrides. Often these are 'extensions' of the original function, adding new checks, events, side effects, etc., and therefore require calling into the original:However, this is not possible if
foo
isexternal
, becausesuper.foo()
is considered an internal function call by the language (!).This PR changes all
external
functions and makes thempublic
. This creates a slight issue whereexternal
andinternal
functions had similar names: they will now both be internally-callable, which may lead to hard to detect mistakes. A prime example wereAccessControl
'sgrantRole
and_grantRole
. After some consideration, we decided to avoid these scenarios, by either renaming theinternal
functions, or removing them where we considered they weren't really necessary.This PR is best reviewed commit-by-commit.