The new, new phobos sneak preview

Jason House jason.james.house at gmail.com
Sat Apr 11 21:31:21 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.
> 
> --bb

There's no need for imported names to be unambiguous. Users can give aliases to imports or import specific members. I hate how Tango puts stuff in structs for no good reason



More information about the Digitalmars-d mailing list