[Lazarus] OOP basics - 2

Alexander Klenin klenin at gmail.com
Thu Apr 15 16:54:55 CEST 2010


On Fri, Apr 16, 2010 at 00:34, Marco van de Voort <marcov at stack.nl> wrote:
> I've always thought that (and strict private) to be highly doubtful.
>
> IMHO there is a bigger chance in making mistakes in micromanaging visibility
> that you regret later, then making dangerous mistakes because private is
> visible inside an unit.

Maybe, but note that fixing "too strict" visibility is a trivial
one-line change,
while fixing "too lax" visibility might require a serious code refactoring.

More importantly, most bugs are easy to fix once you fully understand
the software architecture and the nature of the problem.
It is that understanding that is greatly harmed by too large units and
excessive fields scope.

-- 
Alexander S. Klenin




More information about the Lazarus mailing list