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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID 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: f79bb,953e1a6689d791f6 X-Google-Attributes: gidf79bb,public X-Google-Thread: 103376,953e1a6689d791f6 X-Google-Attributes: gid103376,public From: William Clodius Subject: Re: Eiffel and Java Date: 1996/11/01 Message-ID: <327A3749.41C6@lanl.gov>#1/1 X-Deja-AN: 193724385 references: <550sm2$sn1@buggy.news.easynet.net> <55crp0$qn9@dscomsa.desy.de> content-type: text/plain; charset=us-ascii organization: Los Alamos National Lab mime-version: 1.0 newsgroups: comp.lang.eiffel,comp.lang.ada,comp.lang.sather x-mailer: Mozilla 2.0S (X11; I; IRIX 6.2 IP22) Date: 1996-11-01T00:00:00+00:00 List-Id: Matthias Ernst wrote: > > All languages that unify inheritance and subtyping enforce that once you > inherit from a class you build a subtype. There are several examples (mostly > with binary methods and the type Self, SAME, like Current or whatever) that > show that it may be the implementation you are interested in but you can't > guarantee subtype relationship. > The above restriction is true only if you maintain single dispatch, as in most object oriented languages. However, I suspect that most programmers would find that the work required to maintain full sub-typing relations with multiple dispatch to be more effort than is justifiable and the result would be semantically error prone even if nominal type consistency is maintained. Most related objects should not satisfy the subtype/supertype relationship, and making them satisfy such a relationship can result in code that does not enforce encapsulation. Local type consistency, see for example the work on Cecil, may be more useful -- William B. Clodius Phone: (505)-665-9370 Los Alamos National Laboratory Email: wclodius@lanl.gov Los Alamos, NM 87545