On 2012-11-29 12:44, foobar wrote:

What's wrong with attaching the annotation to the module declaration?
i.e.
@no_circular_ctors module foobar;

Ideally, I'd like to have the reverse default - require an explicit
import _inside_ the static ctor when a dependency actually exists. Seems
to me that in the vast majority of cases this is the actual preferred
choice by users and for the tiny (if any) percent that depend on the
current behavior - they'll just get an easy to fix compile-error - e.g.
symbol foo.bar is missing, solvable by adding the relevant import.
Of course, such a change should be properly announced and documented per
the other thread about the development process of D.

Having the imports inside the static constructor sounds like a good idea.

--
/Jacob Carlborg

Reply via email to