September 06, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6180



--- Comment #10 from Jonathan M Davis <jmdavisProg@gmx.com> 2012-09-05 18:16:11 PDT ---
> It shouldn't be. The summary obviously describes horribly broken behaviour.

It describes how it works in C++ which is exactly how it works in D. It's that way by design, and anything else would require that the language be changed.

What many have argued for is that private symbols should be hidden (or at least not be considered in overload resolution when not accessible or otherwise cause conflicts with accessible symbols), which I think would be a major improvement, but that's not the way that it currently works or is ever expected to work unless you can convince Walter to change it.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 06, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6180



--- Comment #11 from timon.gehr@gmx.ch 2012-09-05 18:49:03 PDT ---
(In reply to comment #10)
> > It shouldn't be. The summary obviously describes horribly broken behaviour.
> 
> It describes how it works in C++

Irrelevant.

> which is exactly how it works in D. It's that way by design,

This does not matter either. It is an incorrect design.

> and anything else would require that the language be changed.
> 
> What many have argued for is that private symbols should be hidden (or at least not be considered in overload resolution when not accessible or otherwise cause conflicts with accessible symbols), which I think would be a major improvement,

These are not conflicts. The compiler is deliberately lying about this.

> but that's not the way that it currently works or is ever expected to work unless you can convince Walter to change it.

Introducing a private module scope symbol currently is a breaking interface change (even in code that does not use any metaprogramming!) This is ridiculous.

I assume that Walter will figure it out.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 06, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6180



--- Comment #12 from Jonathan M Davis <jmdavisProg@gmx.com> 2012-09-05 19:26:03 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. AFAIK, Walter doesn't think that there's anything wrong with it. I have no idea how easy it will be to convince him otherwise. But if you don't like the current design, then start a discussion in the newsgroup on it and convince Walter.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 06, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6180



--- Comment #13 from dawg@dawgfoto.de 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: -------
September 06, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6180



--- Comment #14 from dawg@dawgfoto.de 2012-09-06 04:21:38 PDT ---
Besides C++ people seem to draw the same conclusions. http://www.youtube.com/watch?v=8SOCYQ033K8&t=4m41s http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2006.pdf

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
1 2
Next ›   Last »