On Nov 29, 2025 at 4:58:38 AM, Amir via fpc-pascal <
[email protected]> wrote:

>   In C++, the concept of header files vs c++ files is helpful. In
> Golang, one could implement the functions for a class in several files,
> as long as they are in the same directory (namespace).
>

I see your point, if there is a "file private" restriction then that
constrains you to one file by definition and now you must use includes to
break code apart. Personally I don't like them either because they break
Pascals unit design and I've long wanted a way to include a unit so it
behaves like an include.

Honestly though it's not an unsolvable problem it just means you need to
make interface/implementation IFDEFs in the units and then join them
together yourself. I think this pattern is widely used but it is hacking
around a feature the compiler should have in my opinion.
_______________________________________________
fpc-pascal maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to