rfc:inheritance_private_methods

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
rfc:inheritance_private_methods [2020/06/08 15:53] – Close the open issues and mention exception for constructors pmmagarfc:inheritance_private_methods [2020/06/11 16:34] pmmaga
Line 103: Line 103:
 The final keyword when applied to a private method should have no significance. In most cases, a correct approach is to use ''final protected'' modifiers in a function where overriding is not desired. The final keyword when applied to a private method should have no significance. In most cases, a correct approach is to use ''final protected'' modifiers in a function where overriding is not desired.
  
-**NOTE:** Due to how common the usage of ''final private function _construct'' is and given that the same results cannot be achieved with ''final protected function _construct'', an exception to this rule is made for constructors. With this exception, they are the only case where a child class can't override a ''final private'' method.+**NOTE:** Due to how common the usage of ''<nowiki>final private function __construct</nowiki>'' is and given that the same results cannot be achieved with ''protected'' visibility, an exception to this rule is made for constructors. With this exception, they are the only case where a child class can't override a ''final private'' method.
  
 ===== Backward Incompatible Changes ===== ===== Backward Incompatible Changes =====
rfc/inheritance_private_methods.txt · Last modified: 2020/07/17 14:59 by pmmaga