lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


on 7/25/04 1:10 PM, Rici Lake at lua@ricilake.net wrote:

> There was quite a discussion about cyclic import at some point. How
> does one handle mutually dependent packages? It is not always easy to
> eliminate this. Indeed, to my mind this is the semantic difference
> between "require" and "import": require defines a dependency (this
> package won't work without the other one) while import defines a
> need:(I'm about to use this package, I need it now.) Of course, that is
> just me, and the particular words are not important, but there do seem
> to be two use cases.

The Oberon System demonstrated that you can do quite a bit without cyclic
import. The fallback usually involves having one module register itself with
the other module after importing it. This mechanism is referred to as an
upcall in Oberon.

Mark