Private visible?

Dave Dave_member at pathlink.com
Thu Jul 13 11:16:15 PDT 2006


Dave wrote:
> Lars Ivar Igesund wrote:
>> Dave wrote:
>>
>>> Lars Ivar Igesund wrote:
>>>  > Lucas Goss wrote:
>>>  >
>>>  >> Was there ever any resolve as to private being visible? I know 
>>> Walter
>>>  >> said he saw the value of private by default, but what about private
>>>  >> being visible? It just seems to have dropped off the radar and I 
>>> don't
>>>  >> know if thats good or bad.
>>>  >>
>>>  >> Lucas
>>>  >
>>>  > Did you mean accessible? Anyway, see Bruno's post, although I'm quite
>>> sure
>>>  > it won't be forgotten by some of us ;)
>>>  >
>>>
>>> Here's my take - feel free to correct:
>>>
>>> - accessible: the symbol can be used (accessed). Must be visible as well
>>> for the lookup (I realize this is obvious).
>>
>> Yes, that would be the sane thing, but one of the privacy problems in 
>> D, is
>> that it has been possible to access symbols by using the FQN, even though
>> it really isn't visible (declared to be private). As it is, I see no 
>> reason
>> to differ between visible and accessible, IMO they're two sides of the 
>> same
>> coin, or should be.
>>
> 
> See: http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/39754

A little too terse, I was... I tend to agree that they should be two 
sides of the same coin but the gist of it is that they aren't in D 
because they aren't in C++ for (possibly obscure) reasons that might not 
apply to D.

Everyone seems to agree that 'private' should not be accessible and the 
current behavior is a bug. What we're all wondering is if 'private' can 
also mean 'invisible' because that seems to be more intuitive. Than you 
don't have that extra level of complexity for lookup resolution and 
things like error messages describing a private interface.



More information about the Digitalmars-d mailing list