public aliases to private/package symbols
Nick Sabalausky
a at a.a
Tue Jan 24 14:24:38 PST 2012
"Nick Sabalausky" <a at a.a> wrote in message
news:jfnag6$317n$1 at digitalmars.com...
> "Martin Nowak" <dawg at dawgfoto.de> wrote in message
> news:mailman.782.1327427928.16222.digitalmars-d at puremagic.com...
>> Should aliases be allowed to raise the accessibility of a symbol?
>>
>> http://d.puremagic.com/issues/show_bug.cgi?id=4533
>> http://d.puremagic.com/issues/show_bug.cgi?id=6013
>
> Yes.
>
How else are you going to separate the interface for the internal
implementation of a template from its for-public-consumption interface?
This whole issue is literally *NO* different from "Should a public
pointer/reference be allowed to point to private data?" or "Should a public
function be allowed to expose a private one?" The answer is: "Obviously
yes".
I don't understand why anyone thinks this is any different just because
they're aliases instead of pointers/references/functions/etc. All the
arguments against public alias to private symbols apply equally to these
questions too, and in those cases nobody would even question it. What is it
about aliases that suddenly trips people up and makes them think the whole
concept of accessibility should be flipped around on its head?
More information about the Digitalmars-d
mailing list