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: 1108a1,6806d4da9f37ac7c X-Google-Attributes: gid1108a1,public X-Google-Thread: f79bb,953e1a6689d791f6 X-Google-Attributes: gidf79bb,public X-Google-Thread: fdb77,953e1a6689d791f6 X-Google-Attributes: gidfdb77,public X-Google-Thread: 103376,953e1a6689d791f6 X-Google-Attributes: gid103376,public From: Kai.Quale@usit.uio.no (Kai Quale) Subject: Re: Eiffel and Java Date: 1996/11/18 Message-ID: #1/1 X-Deja-AN: 197255631 references: <5694r8$c9c@mulga.cs.mu.OZ.AU> <1996Nov12.143451.16691@schbbs.mot.com> organization: USIT Univeritetet i Oslo newsgroups: comp.lang.eiffel,comp.lang.ada,comp.lang.sather,comp.lang.java.advocacy,comp.object Date: 1996-11-18T00:00:00+00:00 List-Id: In article <1996Nov12.143451.16691@schbbs.mot.com>, shang@corp.mot.com wrote: > However, it helps subclass reuse the code in its parent class > by violating the constraining requirement regulated by its > parent. That is why I say that it is not good. > > When a subclass has to violate the regulation, either the subclass > should not be a child, or the parent class provides a wrong > regulation. How does separation of subtype from subclass help a subclass in violating the constraining requirement regulated by its parent ? Btw, by "parent", do you mean its supertype or superclass ? >From what I know of Sather: * (Abstract) types/interfaces have only type constraints. The Sather compiler will not allow a class to break the type constraints of its supertypes. * (Concrete) classes may have invariants and such. - If a (concrete) class inherits an invariant from its superclass, it cannot break it anymore than its superclass can. - If it doesn't inherit the invariant (and assuming it doesn't re- implement it), it doesn't HAVE the invariant (and as such can't break it). Sather people, have I got this right ? kai -- Kai Quale USIT, University of Oslo email: Kai.Quale@usit.uio.no