<html><body><div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Nov 30, 2025 at 10:44:47 PM, DougC via fpc-pascal <<a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>> wrote:<br></div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" type="cite">
<div><div>One good exercise is to place each class in its own unit. Do the classes now work well together? If not, you have not designed your hierarchy according to proper OOP methodology. <br></div><div></div></div>
</blockquote>
</div>
<br>
<div dir="ltr">
The problem I'm assuming is he wants to write access to some fields across many classes but ONLY in the library. Users of the library should not have write access.</div><div dir="ltr"><br></div><div dir="ltr">This makes sense to me but it means due to the "file private" nature of the scoping all classes must be in the same unit.</div><div dir="ltr"><br></div><div dir="ltr">Personally I'm fine with big units. I have some that are nearly 10,000 lines but that doesn't matter because compilation times are fast and there is a language server so you can jump to methods easily. I think OP should just accept this and forget about putting each class in its own file, which for me personally is harder to navigate.</div></body></html>