Arbitrary abbreviations in phobos considered ridiculous

Brad Anderson eco at gnuk.net
Fri Mar 9 15:48:50 PST 2012


On Fri, Mar 9, 2012 at 4:45 PM, Jonathan M Davis <jmdavisProg at gmx.com>wrote:

> On Friday, March 09, 2012 18:39:25 Steven Schveighoffer wrote:
> > I want to stress again the difference between C++'s namespaces, and D's
> > module import mechanism. In C++, you *deliberately* pull a namespace into
> > your scope (and usually only in the implementation file, which doesn't
> > affect any other implementation files), whereas in D, a standard "import
> > std.datetime" *automatically* pulls its namespace into your scope, and
> any
> > public imports it has made.
>
> Yeah. D has great tools for getting around conflicts, but things tend to
> conflict by default, which means that it's very easy to break code by
> introducing conflicts when adding functions.
>
>
Hmm, fair enough.  In our case they were essentially pulled into the global
namespace due to some questionable decisions with regard to namespaces made
in our project.  The difference between D and C++ is important to point out
though so thanks for clarifying.

Regards,
Brad Anderson


> - Jonathan M Davis
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120309/d14dbf32/attachment.html>


More information about the Digitalmars-d mailing list