From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,953e1a6689d791f6 X-Google-Attributes: gidfac41,public X-Google-Thread: fdb77,953e1a6689d791f6 X-Google-Attributes: gidfdb77,public X-Google-Thread: f79bb,953e1a6689d791f6 X-Google-Attributes: gidf79bb,public X-Google-Thread: 103376,953e1a6689d791f6 X-Google-Attributes: gid103376,public From: shang@corp.mot.com (David L. Shang) Subject: Re: Eiffel and Java Date: 1996/11/11 Message-ID: <1996Nov11.142547.4810@schbbs.mot.com>#1/1 X-Deja-AN: 195888354 sender: news@schbbs.mot.com (SCHBBS News Account) references: <328592FC.64F26D66@sede.unijui.tche.br> organization: MOTOROLA reply-to: shang@corp.mot.com newsgroups: comp.lang.eiffel,comp.lang.ada,comp.lang.sather,comp.lang.java.advocacy Date: 1996-11-11T00:00:00+00:00 List-Id: In article <328592FC.64F26D66@sede.unijui.tche.br> "Marcos F. F. de Macedo" writes: > This kind of interface/implementation in Sather is diferent of the usual > concept. This is subtype/subclass independence. That is a good thing in > Sather that I have not yet thinked of the exact consequences. > > Interfaces in Java have nothing to do with this concepts. Interface in > Java is an implementation restriction (not a conceptual one) to avoid > multiple-inheritance and work yet work with static typing. Interface is > java is just a deferred class with just deferred routines. Nothing more, > nothing less. > Separation of the interface from implementation is a good thing. It is required by the practical software engineering needs to reduce the dependency among software components. But separation subtype from subclass is not. It is not required for any practical reason, rather, a patch to the imperfect supertype specification. In Sather, implementation classes are not always subtype of the parent class. They merely reuse the code (inherite the implementation) defined in their parent, but not necessarily be subtype of it. Without subtyping, the interface provided in the parent cannot serve as a polymorphic interface for all the implementations. In Java, implementation classes are always subtype of the interface class, but they cannot reuse the code in the interface class, because there is no implementation in the interface. Without implementation inheritance, it is not easy to provide the default implementation mechanism for code reuse. Transframe's multiple interface inheritance plus implementation delegation provides a perfect way for both subtyping and implementation reuse. For detail, refer to: Multiple Inheritance -- A Critical Comparion http://www.sigs.com/publications/docs/oc/9611/oc9611.shang.c.html David Shang