Re: Re: Visibility

Rohan Hart <[email protected]> Tue, 05 Apr 2005 09:32:37 +1200
Newsgroups gmane.comp.lang.nice.general
Message-ID <[email protected]>
On Fri, 25 Mar 2005, Daniel Bonniot said:
 >> All I'm really arguing for is to make the scope of the visibility
 >> explicit at the definition point.

 > So what would be your concrete proposal?

Simply call this level of visibility "module" rather than "private".

 > Since we agree that "private" means visible in the module, then
 > what is the problem? A private field is visible outside it's
 > closest "scope" (its class) to the whole module. That's similar to
 > 'default' being visible outside the module to the whole package.

Because it's different from what Java calls "private".

 >> Other languages seem to do alright with one file per package.  Perhaps
 >> thats because they can re-export imported symbols which allows for
 >> package aggregation, ie., one public package and several internal
 >> packages.  Nice and Java only provide this implicitly.

 > How does Java provide this (even implicitly)?

By stuffing all the "internal" packages into one flat namespace and
providing the scattergun "import package.*"

cheers
Rohan



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click