The new, new phobos sneak preview
grauzone
none at example.net
Sat Apr 11 22:28:06 PDT 2009
Bill Baxter wrote:
> On Sun, Apr 12, 2009 at 5:50 AM, Andrei Alexandrescu
> <SeeWebsiteForEmail at erdani.org> wrote:
>> Lars Kyllingstad wrote:
>>> I think isInfinite!() should be called isInfiniteRange!(). The current
>>> name is, in my opinion, too general.
>> I'm undecided about this (and similar cases). isInfinite sits inside
>> std.range, so std.range.isInfinite is clear and std.range.isInfiniteRange
>> feels redundant. On the other hand, I don't want to use too common symbols
>> because then the user will be forced to prefix them whenever they clash.
>
> This is one of the big reasons why "static import" by default would
> have been better than pull-everything-in by default.
>
> But since pull-everything-in *is* the default. I agree with Lars.
> Symbols supplied by modules should look unambiguous even when
> undecorated by their module name. Or you could use the trick that
> Tango often uses -- make a static struct with a few members. It's
> pretty ugly though, if you ask me. Introducing a static struct just
> to get a namespace to replace the namespace that is already there but
> gets stripped as the default action upon 'import'. Ick.
This could be easily fixed by changing the import statement such, that
the module name is used as namespace:
import some.mypackage.mymodule;
mymodule.somefunctionfrommymodule();
This is a bit different from static imports, that require the full
package path, and it's exactly like you use Tango modules.
> --bb
More information about the Digitalmars-d
mailing list