scoped imports

Timothee Cour thelastmammoth at gmail.com
Sun Aug 18 02:52:11 PDT 2013


On Sun, Aug 18, 2013 at 2:31 AM, Joseph Rushton Wakeling <
joseph.wakeling at webdrake.net> wrote:

> On Sunday, 18 August 2013 at 01:33:51 UTC, Timothee Cour wrote:
>
>> that's not DRY: in my use case, a group of functions use certain imports,
>> it would be annoying and not DRY to do that. What I suggest (allowing {}
>> grouping at module scope) seems simple and intuitive; any reason it can't
>> be done?
>>
>
> How do you ensure that the imports are limited to your {} scope, but your
> functions are not, without a finnicky special case for how scopes work?
>

granted, that's not ideal. How about the other points I mentioned?
void fun(){
version=A;
version(none):
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20130818/4e694ce2/attachment.html>


More information about the Digitalmars-d-learn mailing list