Re: Do interfaces make sense in multiple dispatch languages?

Isaac Gouy <[email protected]>
Newsgroups gmane.comp.lang.nice.general
Message-ID <[email protected]>
> I think that the term "interface" and the phrase "implements
> interface" are both very confusing because they do not match the
> underlying abstract model of the language. 

We don't seem to state clearly enough what the underlying model of the
language is - IMO folk who haven't previously used multimethods (like
me) need this to be in Really Big Letters ;-) 

The current user manual is a big improvement, IMO Chapter 2 should
outline these fundamental differences: in Nice a class is a datatype -
a class does not contain methods in the way that Java does; in Nice a
method is a generic function, dynamically dispatched according to the
type of all its parameters - a method is not associated with a
particular class; although in many cases we can write Nice in a way
very similair to how we would write Java.

Haven't I been a sufficient example of someone experienced with single
inheritance OO, just not getting what was different about Nice ;-)

The computational model isn't what people are used to - we need to say
it loud and often to overcome their previous experience. That much I
agree with.

> In Nice, all we can say is that an interface introduces a type; it
> does not define a set of methods. That is why I suggested to
> replace "interface Y { }" with "type Y" and "class X extends Z
> implements Y { ... }" with "class X <: Y" (read "class X
> extends Z and conforms to type Y").
 
If an interface is a type, what's a class? Isn't a class a type?


> I don't think it makes sense to call a Nice interface a "trait"
(You're agreeing with Daniel). I agree too. 

> 2. Whether to implement multiple inheritence of state.
Let's see what can be done without it.

> The more I think about this the more it seems I am suggesting that
> the Nice team re-implement Cecil. 
That would be a Cecil that can reuse existing Java libraries?

best wishes, Isaac

__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
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.