public aliases to private/package symbols

Nick Sabalausky a at a.a
Tue Jan 24 17:05:13 PST 2012


"Peter Alexander" <peter.alexander.au at gmail.com> wrote in message 
news:bfhygfbdlubuwelaqfws at dfeed.kimsufi.thecybershadow.net...
>
> For example, one could argue that it's also obvious that an alias should 
> behave exactly the same as the thing it aliases. Allowing aliases to 
> change protection would break that.
>

FWIW, If someone were to argue that, my response would be something like:

1. If you wanted it *exactly* the same, you wouldn't have aliased it at all. 
So naturally, that "exactly" is subject to reasonable exceptions.

2. Protection levels apply to symbols, not the construct or data the symbol 
refers to.

3. (Just reiterating I guess:) Protection levels are not, should not, and 
cannot realistically be transitive.

> For the record, I agree that the answer should be "yes", but it's




More information about the Digitalmars-d mailing list