static and protection
Hasan Aljudy
hasan.aljudy at gmail.com
Wed Mar 1 12:03:28 PST 2006
Kyle Furlong wrote:
> John C wrote:
>
>> It appears that protection attributes on static class methods don't
>> get recognised. This compiles without errors:
>>
>> module stuff;
>>
>> class Visible {
>> private static void hidden() {}
>> }
>>
>> -----8<-----
>> module program;
>>
>> import stuff;
>>
>> void main() {
>> Visible.hidden();
>> }
>>
>> An error is issued if hidden() is at module level. I sometimes feel
>> that classes are second-class citizens in D.
>>
>
> This protection stuff is rediculous, any modern OO language needs to
> handle these things well.
Yeah, and the implicit module friendship is rediculous too!!! The whole
C++ friend concept is rediclous.
More information about the Digitalmars-d
mailing list