diff --git a/docs/contracts.rst b/docs/contracts.rst index 837f43fcd781..61a38eccfa78 100644 --- a/docs/contracts.rst +++ b/docs/contracts.rst @@ -1078,8 +1078,6 @@ Such contracts cannot be compiled (even if they contain implemented functions al function utterance() public returns (bytes32) { return "miaow"; } } -If a contract inherits from an abstract contract and does not implement all non-implemented functions by overriding, it will itself be abstract. - Note that a function without implementation is different from a :ref:`Function Type ` even though their syntax looks very similar. Example of function without implementation (a function declaration):: @@ -1090,6 +1088,9 @@ Example of a Function Type (a variable declaration, where the variable is of typ function(address) external returns (address) foo; +Abstract contracts allow you to decouple contract definition from implementation providing better extensibility and self-documentation and +facilitating patterns like `Template method `_ and removing code duplication. +If a contract inherits from an abstract contract and does not implement all non-implemented functions by overriding, it will itself be abstract. .. index:: ! contract;interface, ! interface contract