On Nov 30, 2025 at 10:44:47 PM, DougC via fpc-pascal < [email protected]> wrote:
> 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. > 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. 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. 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.
_______________________________________________ fpc-pascal maillist - [email protected] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
