Re: Re: Visibility

Daniel Bonniot <[email protected]> Fri, 25 Mar 2005 01:12:52 +0100
Newsgroups gmane.comp.lang.nice.general
Message-ID <[email protected]>
> We are in complete agreement, "private" must be scoped to the module
> in Nice to make any sense for multi-methods.  On the other hand,
> classes at the *syntactic* level define a scope via bracketing and
> objects are created from classes not modules.
> 
> 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?

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.


>  > I see a package as containing a (minimal) set of features (classes and
>  > methods) that provide a certain functionality. In some cases, having all of
>  > them in the same file would make the file too big. Being able to split a
>  > package into several files helps the internal organisation, while that
>  > organisation is hidden to public clients.
> 
> 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)?


Daniel


-------------------------------------------------------
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