DMD 1.038 and 2.022 releases
Lars Ivar Igesund
larsivar at igesund.net
Sat Dec 20 09:45:24 PST 2008
bearophile wrote:
> Walter Bright:
>> Excess isn't the problem, I want to see if import cycles is.
>
> Generally all the modules in my dlibs import each other. This is nearly
> unavoidable, if a module contains string functions, and another one
> contains math stuff, the string module will want to use some math stuff
> and the math module may need string representations and processing. In the
> D specs I haven't seen an advice to not use cyclic imports, so I don't
> want such compiler flag, I prefer a compiler able to manage such cyclic
> imports efficiently.
Cyclic imports is very often a sign of bad design, it typically mean (if it is unavoidable), that the modules shouldn't be separated in the first place. And in D it _is_ a bad idea because static initialization cannot depend on each other, that is cyclic imports of modules with static ctors.
--
Lars Ivar Igesund
blog at http://larsivi.net
DSource, #d.tango & #D: larsivi
Dancing the Tango
More information about the Digitalmars-d-announce
mailing list