On Thu, 03 Dec 2015 21:02:07 +0000, Dicebot wrote: > And for that specific "stable" example - just make it a separate module, > problem solved. To make use of module system for symbol resolution one > needs to have many small modules, _that_ should become D idiom.
Usually the right answer, but then you get into circular dependency problems sometimes. You can fix circular dependency issues with deferred initialization, but that can muck up your API. You can fix them by moving static initialization into its own module, but that requires people to import the static initialization module. So maybe explicit namespaces within a module are justified sometimes.