Lance Collins wrote:
Sorry if this is the wrong place to discuss language issues.

Probably the fpc-dev mailing list.


How can you avoid circular references with two modules that interact with each other?
[...snip...]

This feature is often needed and the "if you need to do that then
something is wrong with your design" argument doesn't fly with me.


I can't agree more. Sometimes there is a valid design for something like that. The compilers already handle forward declarations in the same unit, so why can that not be applied for multiple units as well. And if the forward declaration is not fully resolved by the time the whole project or unit is compiled - raise a compiler error.

The current usage of forward declaration is exactly the same principle we are trying to use, but this time just across units.

Regards,
  - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/


--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to