Re: But is it Object-Oriented?

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

> Seems like the sort of concerns about multimethods that were current
> when the old Cecil paper* was written will also apply to Nice:
> 
> 'many practicing programmers used to single-dispatching object-oriented
> languages complain that multi-methods just don't feel object-oriented.'
> ...
> programming style. Since multi-methods cannot be viewed as completely
> contained within any single data type, the generic-function-based
> approach treats multi-methods as outside of all objects.'
> 
> *("But is it Object-Oriented?" is a section heading in "Object-Oriented
> Multi-Methods in Cecil (1992)" http://citeseer.nj.nec.com/174216.html) 

That is an interesting paper. But, this idea basically destroys the idea of
encapsulation. This is obvious just by reading section 3.1. They also admitted
this later in the Cecil language specification & rationale:
http://tinyurl.com/34f7f:

"An earlier approach to encapsulation in Cecil suffered from the problem that
privileged access could always be gained by writing methods that specialized on
the desired data structures."

Their later solution was to revert to the generic function approach and solve
encapsulation issues at the module level. IMO, for a multimethod language this
makes the most sense. In fact, their module system is not much different than
what I suggested in the Dev/VisibilityModifiers wiki for Nice. My suggestions
there were surely greatly influenced by me having previously read the Cecil papers. 

In Java/Eiffel/C++ there is the idea that an ADT is implemented by a class. In
ML, Haskel, and languages with generic functions, it would be more appropriate
to say that an ADT is implemented by a module, where a module is a collection of
types and methods defined on those types. 

Regards,
Brian





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