On Saturday, 26 April 2014 at 15:19:55 UTC, Timon Gehr wrote:
On 04/26/2014 01:57 PM, Dicebot wrote:


I think this is a very bad proposal. Necessity to define namespaces for interfacing with C++ must not result in usage of namespaces of pure D code.

Well, the proposed feature does not add any new capabilities except proper mangling. In pure D code

namespace foo{
    // declarations
}

would be basically the same as

private mixin template Foo(){
    // declarations
}
mixin Foo foo;

which is available today. I guess namespaces will occur in pure D code as sparsely as the above construction, because they are not particularly useful.

This is side effect of an advanced D feature that is unlikely to be used by newbies and is less tempting to use in practice because it involves some boilerplate. Providing it as simple stand-alone feature is akin to saying "hey, use me!".

I don't want that in D.

I would have also strongly objected to usage of template mixins for namespace during any code review.

Reply via email to