Re: But is it Object-Oriented?

Daniel Bonniot <[email protected]>
Newsgroups gmane.comp.lang.nice.general
Message-ID <[email protected]>
Isaac Gouy wrote:

>>BTW, Java is specified roughly in the same way, and uses the name 
>>"compilation units" for "modules".
>>    
>>
>
>And the significant difference is, of course, that Java doesn't use a
>"compilation unit" for encapsulation - Java uses types (classes and
>interfaces) for encapsulation.
>  
>
Right, but since you are supposed to have only one top-level class per 
compilation unit, the difference is somewhat blur.

>And as a consequence, we can take code unchanged from different Java
>compilation units, and put it in a single compilation unit without
>changing meaning.
>  
>
If you mean copying one class into another compilation unit, you are not 
supposed to do that. I think it's plainly an error for a public class, 
and it will confuse the Java compiler for a 'package' class.

>If we try to do that with the current proposal then we'll see "private"
>things become visible where they weren't before.
>  
>
Yes, but that might be the reason why you decide to move code from one 
place to another: so that you regroup those that belong together in the 
same place, where they can freely interact and be hidden from the rest 
of the package.

I think I see what you mean, though. You might want different levels of 
'privateness'. That could be handled by nested units. But I think maybe 
we could leave that for a later stage, don't you think?

Daniel



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.