Qian Xu escribió:
Ary Borenszweig wrote:
Enjoy :-)

Great work.

BTW: Is there any plan to make a "Organize Imports" feature? It would be
very helpful.

Well... now that I've looked at some of JDT's code about this, seems a pretty hard thing to implement (to translate from Java to D, actually). But I'll try to do it, little by little.

One question about this. Imagine you have:

void foo() {
  auto name = readln();
  writefln("Hello %s!", name);
}

When requesting "Organize Imports", which one would you prefer?

1.
import std.stdio;

void foo() {
  auto name = readln();
  writefln("Hello %s!", name);
}

2.
import std.stdio: readln, writefln;

void foo() {
  auto name = readln();
  writefln("Hello %s!", name);
}

I think the second one is better because it's easier to understand the code, but the list of names might get very long. But I remember there were bugs related to selective imports, and I can't remember which were them. (and maybe it's also harder to implement)

Reply via email to