On Thursday, 31 January 2013 at 12:10:29 UTC, Jacob Carlborg wrote:
On 2013-01-31 11:11, Dicebot wrote:

Ugh, how can you split module into two source/object files? Naive approach will result in linker error due to multiple definition of ModuleInfo. I did not know it was possible, would have been really cool
to have.

I'm not 100% sure if it's possible, but it's theoretically possible.

How _exactly_ is it even theoretically possible in D? Sciolism rarely helps when discussing technical issues.

The hard part regarding separate compilation in D is to determine the object file(s) a template instance is emitted to, and the visibility of the symbol. But whether a private symbol is »leaked« into the public API of a module or not can always be determined by just examining the module in question. So, it should be doable, even though the current DMD implementation has bugs in this regard.

David

Reply via email to