http://d.puremagic.com/issues/show_bug.cgi?id=6180
--- Comment #13 from [email protected] 2012-09-06 03:52:07 PDT --- >D takes it access modifier design from C++, and it's purely a question of accessibility, not visibility, even if many people expect it to affect visibility. C++ doesn't have access modifiers on global scope, only within classes/structs. It's primarily needed to restrict access while making all fields visible for the memory layout. The C++ way of hiding symbols is to not expose them in headers and using anonymous namespaces for sources. Using access modifiers for types and functions in D's source only modules has no equivalence in C++. And because unqualified imports are the default we're getting namespaces clashes as with header includes. The hijack protection is only a safety net but it doesn't protect against breaking software. Reading the first paragraph of http://dlang.org/hijack.html it becomes clear that we missed an important design goal. >The mod�ule developers must be able to maintain and improve those modules >without inadvertently stepping on the behavior of modules over which they >cannot have knowledge of. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
