DrDiettrich wrote:
> Florian Klaempfl wrote:
> 
> 
>>C++ creates one monster module in this case as well.
> 
> 
> I disagree. Neither the declarations (interface, header files) nor the
> definitions (implementation, code modules) must reside in one file. 

How the sources are splitted doesn't matter. The compiler handles it as one file
and creates one object module. The compiler even doesn't see that the files are
splitted, the preprocessor concats everything.

> C
> header files can #include each other, and some more or less advanced
> techniques can prevent multiple inclusion of the same header file.

Pascal can do the same, see the fpc rtl: for easier handling they are splitted
into multiple files.

Units are a higher level concept than the include files of C++ but units can
often but not necessarily reflect the include file structure.

If you want 1:1 translations use include files in pascal as well.

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to