On Mon, Apr 7, 2008 at 10:16 AM, Tim Starling <tstarling(a)wikimedia.org> wrote:
Extensions can just as easily be broken by excessive
access control.
Excessive access control leads to code duplication, when the functionality
in private methods is duplicated in the external project by copying and
pasting. Such duplication may lead to breakage when the original method is
updated, and it turns review into a game of "spot the difference".
Sometimes access control will simply kill a project dead, with no progress
being possible except via a core patch.
In principle, that depends on how thoughtful you are in what methods
you make public, but in practice I guess you're right, yes.
So I find it hard to believe that access control is
for the benefit of the
extensions. Rather, I think it's because the people who develop the core
code fail to recognise the general applicability of what they write, and
so, following the coding convention from other projects, apply private
access control by default.
If you want to document the expected stability of an interface, you can do
it with a comment. Let the extension developer decide whether it is
worthwhile to them to use an unstable interface.
Maybe so.