Re: Do interfaces make sense in multiple dispatch languages?
Isaac Gouy <[email protected]>
| Newsgroups | gmane.comp.lang.nice.general |
|---|---|
| Message-ID | <[email protected]> |
> the diamond problem for interfaces exists in Nice.
like this?
void main(String [] args) {
let it = new InterfaceBottom();
println( interfaceFoo(it) );
}
Ambiguity for symbol interfaceFoo. Possibilities are :
nice.lang.int interfaceFoo(InterfaceRight t)
nice.lang.int interfaceFoo(InterfaceLeft t)
(Same as with Scala's Traits)
> the concept of interface can be replaced in Nice without introducing
> any ill effects from a language semantics viewpoint
Shouldn't we ask what we expect the benefits of multiple inheritance to
be? To quote from that JavaWorld article
http://www.javaworld.com/javaworld/jw-12-1998/jw-12-techniques_p.html
"I spent five years programming in C++, and in all that time I had
never once used multiple inheritance. Multiple inheritance wasn't
against my religion exactly, I just never encountered a C++ design
situation where I felt it made sense. When I started working with Java,
what first jumped out at me about interfaces was how often they were
useful to me."
__________________________________
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