Allow identical imports

JS js.mdnq at gmail.com
Tue Jul 30 04:01:06 PDT 2013


On Tuesday, 30 July 2013 at 10:36:15 UTC, Dicebot wrote:
> You can use scoped local imports and avoid necessity to track 
> global state.

Huh? If I follow you, this won't work. I'm generating code so 
don't have the luxury to mess with the outer scope where the code 
is going.

mixin(code fragment)

user code

mixin(code fragment)

user code

if both code fragments have the same import statement then there 
is an error. The only way for them to be aware of that is to have 
a global state(well, relative to the scope they are in).




More information about the Digitalmars-d mailing list