Currently reading solidity documentation: https://solidity.readthedocs.io/en/develop/types.html#function-types
By default, function types are internal, so the internal keyword can be omitted. In contrast, contract functions themselves are public by default, only when used as the name of a type, the default is internal.
This does not make sense to me. How can a function be internal and public at the same time?
I know internal
means functions can only be called within the contract and external
can be called outside of the contract. So to me, internal is private and external is public but the documentation makes it sound like it can be public and internal at the same time?
So what is the difference, if any, between internal/external
and public/private
in regards to functions?