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: 1108a1,953e1a6689d791f6 X-Google-Attributes: gid1108a1,public X-Google-Thread: 103376,953e1a6689d791f6 X-Google-Attributes: gid103376,public X-Google-Thread: f79bb,953e1a6689d791f6 X-Google-Attributes: gidf79bb,public X-Google-Thread: fdb77,953e1a6689d791f6 X-Google-Attributes: gidfdb77,public From: shang@corp.mot.com (David L. Shang) Subject: Re: Eiffel and Java Date: 1996/11/06 Message-ID: <1996Nov6.135231.13466@schbbs.mot.com>#1/1 X-Deja-AN: 195010719 sender: news@schbbs.mot.com (SCHBBS News Account) references: <55nvo4$mgk@gaia.ns.utk.edu> organization: MOTOROLA reply-to: shang@corp.mot.com newsgroups: comp.lang.eiffel,comp.lang.ada,comp.lang.sather,comp.lang.java.advocacy,comp.object Date: 1996-11-06T00:00:00+00:00 List-Id: In article <55nvo4$mgk@gaia.ns.utk.edu> mbk@caffeine.engr.utk.edu (Matt Kennel) writes: > > I don't think the generic class concept is the same, but the following > appears to do what you desire. The main difference is that in Sather > $TYPE{T} and $TYPE are wholly unrelated _a priori_. $TYPE is not a superytpe > of $TYPE{T} unless explicitly declared that way, as in this example. > Correct. That's the major difference. Making $TYPE{T} be subtype of $TYPE without explicit declaration will simplify the type system and avoid redundant class hierarchy. Besides, in Sather code, > typecase ob > when $OVER{INT} then ob.feature1(42); > else #OUT + "No matching typecase\n"; > end; you have to know the exact type of "ob" before you can call "feature1". In Transframe, what you want to assure is just the element type to be "int". You are not necessary to know the enclosing type. David Shang