Re: But is it Object-Oriented?
Daniel Bonniot <[email protected]>
| Newsgroups | gmane.comp.lang.nice.general |
|---|---|
| Message-ID | <[email protected]> |
>>There is not less data abstraction when you have multi-method than when >>you are restricted to mono-methods. In both cases, outside of the >>package defining a class, you can only use the operations that are >>public. >> >> > >The paper that Isaac cited argued exactly against this. The argument cited was >like this: Some "fundamental" methods need access to the implementation (fields) >of a "class" and some methods can be implemented purely in terms of those >fundamental methods. But, how do you distinguish which methods are fundemental >(privileges to access private members) and which aren't? Let's say that if a >method implementation has a parameter specialized on a particular "class" then >it is given privileged access. Otherwise, it isn't. Then, we can recognize all >the fundemental operations of each "class" by looking at the method argument >specializations. > > Yes, this rule breaks data-abstraction (note that I never advocated this behaviour). But since this rule is arbitrary, I don't think this shows that multi-methods lead to less data-abstraction. It just shows that this is a wrong rule, and that you have to use another one :-) >I think everybody here agrees that this isn't a good idea. Like I mentioned >before, I think that ADT = module = types+functions like in OCaml/SML. > > I agree with that. That's the idea for Nice: let the package system take care of visibility. 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