Aliases and permissions [was: Re: extern(C++, NS)]

Joseph Rushton Wakeling via Digitalmars-d digitalmars-d at puremagic.com
Sun Nov 29 04:39:12 PST 2015


On Sunday, 29 November 2015 at 04:57:28 UTC, Walter Bright wrote:
> Aliases do not change access permissions. They are just aliases.

Note that this is a problem beyond Manu's use-case.  Example: 
subtyping via alias this currently requires the alias'd entity to 
be public, contra the example given on TDPL p.231 (see 
https://issues.dlang.org/show_bug.cgi?id=10996 for details).

This means that to use subtyping in practice requires internal 
implementation details to be revealed to the user, which isn't 
very nice :-(


More information about the Digitalmars-d mailing list