import concerns (was Re: Historical language survey)

Derek Parnell derek at psych.ward
Sat Jul 8 00:55:01 PDT 2006


On Sat, 08 Jul 2006 13:38:13 +1000, Walter Bright  
<newshound at digitalmars.com> wrote:

> Derek Parnell wrote:
>> On Sat, 08 Jul 2006 06:56:47 +1000, Walter Bright  
>> <newshound at digitalmars.com> wrote:
>>
>>> The alias works at any level you choose to make it. Alias can be used  
>>> to 'import' any name into the current namespace, making it first class.
>>  Even names that are declared 'private' in the imported module? Is that  
>> how you want it to work Walter? If so, why do we bother with 'private'?  
>> What's the point?
>
> In class scope, access control is done *after* name lookup, not before.  
> I'm concerned about confusion by reversing the order of that for module  
> scope.

Well don't be concerned. It is far more confusing for something declared  
as private to be not seen as private. I believe the natural way of  
thinking for people is that some that is "private" is not to be *seen* by  
others, and thus not accessed. So I naturally think that if the compiler  
notices that something is "private" it just pretends that it didn't see it  
and acts as if it doesn't exist.

I am totally convinced that the current thinking is unnatural. That the  
compile sees something therefore ignores the wishes of the author.

-- 
Derek Parnell
Melbourne, Australia



More information about the Digitalmars-d mailing list