Function local imports make it easier to reason about the code
which is of slight importance. The big thing I'd like though is
using it with mixins.

In my cgi.d, there's a mixin main that depends on std.string being
available inside the mixed in function.

Currently, I use a public import of std.string. Alternatively, the
other module could import it too, but that is pretty opaque.


But a scoped import would be cleaner: I could ensure it's always
available in that function without making the mixin user wonder
WTF the error messages are about and without polluting his namespace.

Reply via email to