Descent, now with Open Type Hierarchy

Saaa empty at needmail.com
Wed Jul 29 04:59:16 PDT 2009


2 is very nice towards the namespace
how will you do regex.find vs string.find?

"Ary Borenszweig" <ary at esperanto.org.ar> wrote in message 
news:h4pcpc$2ef6$1 at digitalmars.com...
> 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) 




More information about the Digitalmars-d-announce mailing list