Import improvement

Manu turkeyman at gmail.com
Mon Oct 15 06:38:34 PDT 2012


On 15 October 2012 16:02, Peter Alexander <peter.alexander.au at gmail.com>wrote:

> On Monday, 15 October 2012 at 12:43:59 UTC, Manu wrote:
>
>> Surely this has been considered before. Any reasons it's not supported?
>>
>
> Yes, it has been considered before. There is an enhancement from ages ago
> in bugzilla.
>
> http://d.puremagic.com/issues/**show_bug.cgi?id=3603<http://d.puremagic.com/issues/show_bug.cgi?id=3603>
>
> The syntax you proposed doesn't work, because it conflicts with selective
> imports:
>
> ===[std.d]===
> module std;
> void stdio() {}
>
> ===[test.d]===
> import std : stdio;
>
> Does that import the stdio function from module std, or the module
> std.stdio?
>
> You could use something like this:
>
> import std.(stdio, xml, algorithm);
>
> Of course, there's many variations (square brackets, curly braces, no dot,
> no commas...) but it's all bikeshedding.
>

Awesome. Well, just throwing it out there... any mechanism by which this is
possible will suit me!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20121015/d8958376/attachment-0001.html>


More information about the Digitalmars-d mailing list