> On 29 Aug 2016, at 12:42, William Lupton <wlup...@broadband-forum.org> wrote: > > Regardless of whether circular import is permitted, isn’t it best avoided > from a layering point of view? In general I would think that a module should > be importing things that (a) it needs, and (b) don’t need it. W.
If possible, yes. However, not everything is strictly layered, sometimes it might be useful to put definitions into separate modules even if they are coupled in both directions. Where cyclic references would be really harmful (groupings, identities), YANG spec excludes them explicitly - because they are harmful within the same module, too. Lada > >> On 29 Aug 2016, at 11:34, Ladislav Lhotka <lho...@nic.cz> wrote: >> >>> On 29 Aug 2016, at 09:17, Bogaert, Bart (Nokia - BE) >>> <bart.boga...@nokia.com> wrote: >>> >>> Just taking another approach on this: why do we have the restriction on >>> circular imports? Is this really required? If not then this may be solved >>> in another way too (but will take some time before it gets into the YANG >>> compilers I'm afraid). >> >> In fact, it isn't really needed. Unlike imports in programming languages >> such as Python, import in YANG doesn't incorporate the imported module >> contents, just gives access to objects in a foreign namespace. -- Ladislav Lhotka, CZ.NIC Labs PGP Key ID: E74E8C0C _______________________________________________ netmod mailing list netmod@ietf.org https://www.ietf.org/mailman/listinfo/netmod