[Lazarus] OOP basics - 2

Juha Manninen juha.manninen at phnet.fi
Thu Apr 15 12:48:29 CEST 2010


> It's not only a issue about managing the large files. If you dump all
> classes in a single large unit (or include files, it makes no
> difference), then you give up on all the class visibility rules. Now
> all classes can access all private field variables or methods of all
> other classes in the same unit. THIS is not always a good thing, and
> splitting those classes over multiple units, allows for visibility
> rules.
> 
> 'Strict Private' etc resolves this, but is only supported under Delphi
> mode I believe. It will be useful in ObjFPC mode supports "strict" as
> well.

Strict Private works in ObjFPC mode, too. That's what I have read, not even 
tried myself.
Yes it should be used more. Then big source files are still less of a problem.

Juha




More information about the Lazarus mailing list