[Lazarus] OOP basics - 2
Graeme Geldenhuys
graemeg.lists at gmail.com
Thu Apr 15 11:40:24 CEST 2010
On 15 April 2010 11:33, Juha Manninen <juha.manninen at phnet.fi> wrote:
> Now, the question is also if a big source file is a bad thing or not. I have
> adjusted my way of thinking. The code can be maintained with good tools (like
> Lazarus) even in big files.
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.
--
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
More information about the Lazarus
mailing list