static and protection

Bruno Medeiros daiphoenixNO at SPAMlycos.com
Thu Mar 2 12:51:37 PST 2006


David Medlock wrote:
> Hasan Aljudy wrote:
> 
>> David Medlock wrote:
>>
>>> Tony wrote:
>>>
>>> Disclaimer: the OP code seems to be a bug, I am not contradicting that.
>>>
>>> Each time I hear things like this I always ask for specific pragmatic 
>>> examples of strict protection benefits outside of simple 
>>> namespace-clash issues(which also mean IDE code completion).
>>>
>>> I've yet to see a good example in which strict protection attributes 
>>> prevented any defects.  Thus far this is a sky-is-falling issue, with 
>>> very little real practical evidence.
>>
>>
>> It's not obvious in small programs, but it becomes crucial in large 
>> projects, and even more crucial in projects with millions of lines of 
>> code.
>>
> 
> Most of my projects are in the 10-50k LOC range, with a few dipping 
> 100-200k.   With projects of large size, the interfaces between the 
> components needs to be a component itself.
> 
> A.C(B)
> 
> should be (where C is an object)
> 
> C( A, B )
> 
> No amount of protection in A or B will help there.
> 

Why not? You can still protect C, even though it's an object/class and 
not a method, isn't it so?

-- 
Bruno Medeiros - CS/E student
"Certain aspects of D are a pathway to many abilities some consider to 
be... unnatural."



More information about the Digitalmars-d mailing list