home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.modula3:840 comp.lang.misc:2679 comp.lang.c++:11203
- Newsgroups: comp.lang.modula3,comp.lang.misc,comp.lang.c++
- Path: sparky!uunet!mcsun!fuug!funic!news.cs.hut.fi!news!Ari.Huttunen
- From: Ari.Huttunen@hut.fi (Ari Juhani Huttunen)
- Subject: Re: Sather's Multiple Inheritance
- In-Reply-To: mbk@lyapunov.ucsd.edu's message of 19 Jul 1992 19:20:59 GMT
- Message-ID: <ARI.HUTTUNEN.92Jul20110402@wonderwoman.hut.fi>
- Sender: usenet@cs.hut.fi (Uutis Ankka)
- Organization: Helsinki University of Technology, Finland
- References: <ROCKWELL.92Jul18202725@socrates.umd.edu> <14cfarINNir8@network.ucsd.edu>
- Date: Mon, 20 Jul 1992 09:04:02 GMT
- Lines: 74
-
- >Eliot Moss:
- > Sounds to me as if
- > Sather flattens the types out completely, which will interfere with
- > building large system, by undermining encapsulation.
-
- Well said. That is my understanding also. But the front page of Sather
- manual says that large systems are not intended to be built with Sather.
- (No, I don't think it is a good policy either.)
-
- "Abstract. This report describes the object-oriented programming lan-
- guage Sather. Sather is a simplified, optimized variant of Eiffel (Sather
- tower is a landmark in Berkeley). It is meant to be a working language,
- focussed on the practical needs of writing efficient, reusable code. It is
- designed for individual researchers or small groups and eliminates fea-
- tures which are pedantic, of purely theoretical interest, or necessary
- only for large or naive programming teams. Sather has clean and sim-
- ple syntax, parameterized classes, object-oriented dispatch, multiple in-
- heritance, strong typing, and garbage collection. It generates efficient C
- code which is easily integrated with existing code. "
-
- Rockwell:
- >From what I read, you can get opacity by the simple expedient of
- >masking the detail you want hidden with a later namespace conflict.
- >You can see the names, but the original definitions are shadowed from
- >the point where you see those names.
-
- Kennel:
- >I don't know what quite you mean, but there's the "private" attribute:
-
- Let's consider a simple example:
-
- class FATHER is
-
- private xyz:INT;
-
- foobar is
- xyz := 123;
- end; -- foobar
-
- end; -- FATHER
-
- class CHILD is
-
- FATHER;
- alias father_xyz xyz;
-
- xyz:DOUBLE is
- res := 1.0;
- end; -- xyz
-
- end; -- CHILD
-
- When the 'foobar'-procedure is used on an object of type FATHER, it works
- correctly and assigns 123 to an integer 'xyz'. But when the foobar is
- used on an object of type CHILD, well, the compiler catches the error...
- (You cannot assign to a procedure.)
-
- The 'private' does not prevent redefinition of 'xyz' in CHILD. Also, the
- 'foobar' still uses the old name 'xyz' in CHILD, because the 'alias'
- does not change it. (But you can refer to the integer in CHILD by calling
- it 'father_xyz'.)
-
- (I ran the code through a Sather compiler.)
-
- >Though actually
- >in Sather you can manually find out the "type" of any random object:
- >( I guess the only allowed operations are equality and inequality on this. )
-
- With the help of library classes you can test if one type is a subtype
- of another.
- --
- ...............................................................................
- Ari Huttunen They say the sky high above
- 90-7285944 is Caribbean blue... (Enya)
-