I made a pull request to fix private/package access checks.
https://github.com/D-Programming-Language/dmd/pull/669

Now I'm wondering if that goes into the right direction.

The shallow distinction of visibility vs. accessibility breaks the module system because one can't safely add a private symbol without possibly affecting every dependent module.
Thus we're back at using underscore names to protect from that.

From implementing access checks I found the right amount of checking is to do them when resolving identifiers. Thus it's almost equal to visibility based protection.

We already hide symbols that are privately imported by an imported module.

martin

Reply via email to