About Go, D module naming
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sat Dec 22 20:18:45 PST 2012
On 12/22/12 9:29 PM, Walter Bright wrote:
> On 12/22/2012 12:46 AM, Jonathan M Davis wrote:
>> Pretty much every time that this issue comes up, people are surprised
>> by the
>> fact that private symbols aren't hidden and pretty much no one wants
>> them to
>> be in overload sets.
>
> This has been discussed before, and the same people wanted private
> functions removed from overload sets in classes.
>
> So why does this never come up in C++ if it's such a problem? Like I
> said, I've never seen this come up on peoples' lists of what they don't
> like about C++, and it isn't because they're shy about complaining about
> C++ :-)
The scope is very different. We're talking classes vs. entire modules
and, by percolation of symbols, entire applications.
The comparison would be inappropriate, as would be deriving conclusions
applicable to D from it.
Private inside a module must mean what the person on the street thinks.
No visibility outside the module at all. There are no two ways about it.
Andrei
More information about the Digitalmars-d
mailing list