[Issue 7961] Add support for C++ namespaces

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 11 02:40:55 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=7961



--- Comment #12 from Jacob Carlborg <doob at me.com> 2013-11-11 02:40:48 PST ---
(In reply to comment #5)

> What we have to decide first, though, is how to declare the namespaces in D.
> UDA?

I like the UDA idea, if a library solution cannot work. It will look quite
similar to C++:

@namespace("foo")
{
    @namespace("bar")
    {
        void x ();
    }
}

It can also support a less verbose syntax for nested namespaces:

@namespace("foo::bar") void x ();

Or

@namespace("foo", "bar") void x ();

Or implement AST macros and do it with library code :)

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list