Re: Nice Interfaces == Traits ?

Isaac Gouy <[email protected]>
Newsgroups gmane.comp.lang.nice.general
Message-ID <[email protected]>
> >The Nice interface seems more like what has become known as a Trait.
>
> I'm not sure the term "trait" is well known outside of the circle of 
> language researchers (like you ;-), nor that it conveys an evident 
> meaning. So most people would have to learn what a trait is and to
> keep remembering using it instead of interface.

I agree - they'd know straight away that this is a new thing they need
to learn about, rather than the ubiquitous specification-only thing.

> On the other hand, it is not hard to explain that among the
> advantages of multi-methods (declaring new methods on existing
> classes, specializing on all arguments) there is also the ability to
> implement a method for an interface. Simple, no?

I'm not sure multimethods are well known outside of the circle of
language researchers ;-)

> I would find it awkward to change the name of interfaces just because
> of this fact, because it has nothing to do with interfaces
> themselves, it has to do with the flexibility of multi-methods.

The idee fixe is that interfaces are only declaration.

-snip- 
> Interestingly, this question is very similar to the alternative 
> structural typing/named typing...
> 
> Here, Java considers that since the two methods happens to have the
> same interface, the implementation must be for both, while in Nice
> you need to design you hierarchy to make the sharing explicit.

That's a helpful analogy. Many of the comments I make about Nice
probably have some grounding in a guess about how much we'll have to do
when making code changes - because so much more effort goes into making
code changes then into designing a hierarchy anew. 

Writing "anew" makes me wonder if "alike" should be "thistype" ;-)

best wishes, Isaac

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/


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