[fpc-devel] circular uses clauses

Marco van de Voort marcov at stack.nl
Fri Oct 3 16:00:32 CEST 2008


In our previous episode, Graeme Geldenhuys said:
> > Why do I have to put my files in a directory hierarchy and central (GAC)
> > registries in C# and Java? Why can't I just throw all in one dir and let the
> > compiler figure it out, like in FPC ?
> 
> I agree!  The file names could contain the namespace with a dot
> notation. FPC rules! :-)

The point is that you can't see such limitations separate from how compilers
find files, how files import eachother, their parsing and error generation
model etc.

So trying to compare two systems that chose opposite ways of working in this
regard are next to useless.

That doesn't mean entirely nothing can be done though, actually I believe
older 1.0.x did try to solve simple mutual importing by recompiling units
that reference eachother till their CRC stopped changing. It was abandoned
since it was pretty unstable (and postponed for a module rewrite that must
still happen).

Note however that IIRC this only worked for classes that did NOT reference
eachother, IOW there was only for the case where the units didn't contain
"type loops"



More information about the fpc-devel mailing list