traits getProtection
Timon Gehr
timon.gehr at gmx.ch
Mon Apr 2 15:00:00 PDT 2012
On 04/02/2012 10:59 PM, Simen Kjærås wrote:
> On Mon, 02 Apr 2012 20:02:20 +0200, deadalnix <deadalnix at gmail.com> wrote:
>
>>> Now, there are a number of people very unhappy about this state of
>>> affairs and
>>> want private to hide symbols as well (personally, I think that the
>>> fact that
>>> it makes private aliases effectively useless is reason enough to
>>> seriously
>>> reconsider the current behavior), but I don't know if there's any
>>> real chance
>>> of convincing Walter or not.
>>>
>>
>> This would be a huge mistake. For instance, private method are
>> sometime meant to be overridden in subclasses, which is impossible if
>> symbol is inaccessible.
>>
>> NVI for instance would be impossible in such a situation.
>
Making private symbols invisible to other modules or at least excluding
them from symbol clashes is necessary. The current behaviour is not
useful or desirable in any way.
> NVI is perfectly possible with protected.
Exactly. Furthermore, private implies final anyway.
More information about the Digitalmars-d
mailing list