[fpc-devel] circular uses clauses

Joao Morais post at joaomorais.com.br
Fri Oct 3 19:05:32 CEST 2008


peter green wrote:
> 
>>
>> Because a Pascal compiler parses the interface section of an unit only 
>> once, ... 
> IMO what would fix a lot of the problem would be a "cross unit forward 
> declaration", that is a way to tell a compiler "this type is a class 
> type declared in unit x that is all you need to know for now" (afaict 
> that is all the compiler needs to know to compile a function prototype 
> or similar)
> 
> The current situation means that a set of interrelated classes often 
> must either all be put in the same unit or do a lot of typecasting.

...instead of create 10 lines of 10 units within the uses declaration in 
order to use all that related classes. The former is far better imho.

Joao Morais



More information about the fpc-devel mailing list