On 15 October 2012 16:02, Peter Alexander <peter.alexander.au@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

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!