Simetrical wrote:
On Mon, Apr 7, 2008 at 2:47 AM, Tim Starling tstarling@wikimedia.org wrote:
That's what grep is for.
And that works how, for third-party extensions? Just let them break unless they're checked into our repo?
I'm generally against visibility/access control in object oriented programming.
I've noticed . . .
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.
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.
-- Tim Starling