[fpc-devel] "Friend" classes?
    Florian Klaempfl 
    F.Klaempfl at gmx.de
       
    Sun Mar 20 18:38:58 CET 2005
    
    
  
Micha Nelissen wrote:
> On Sat, 19 Mar 2005 10:04:55 +0100
> DrDiettrich <drdiettrich at compuserve.de> wrote:
> 
> 
>>In porting C++ code to Pascal I often stumbled into circular unit
>>references. Then the only solution is a monster unit, that implements
>>all the related classes at once, where the C++ implementation can be
>>split into appropriate modules. 
> 
> 
> The real question is: was the design of the code ok ? Circular references makes code harder to understand. Layers are easier to understand.
> 
C++ creates one monster module in this case as well. You could do the 
same as in C++: split everything into include files. Pascal units aren't 
1:1 equivalent of C++ include files, if C++ libraries are done properly, 
you can translate namespaces to pascal units.
    
    
More information about the fpc-devel
mailing list