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.9 required=5.0 tests=BAYES_00,CTE_8BIT_MISMATCH autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: fac41,953e1a6689d791f6,start X-Google-Attributes: gidfac41,public X-Google-Thread: 1108a1,953e1a6689d791f6,start X-Google-Attributes: gid1108a1,public X-Google-Thread: 10a640,953e1a6689d791f6,start X-Google-Attributes: gid10a640,public X-Google-Thread: fdb77,953e1a6689d791f6,start X-Google-Attributes: gidfdb77,public X-Google-Thread: 109fba,953e1a6689d791f6,start X-Google-Attributes: gid109fba,public X-Google-Thread: f79bb,953e1a6689d791f6,start X-Google-Attributes: gidf79bb,public X-Google-Thread: 114809,953e1a6689d791f6,start X-Google-Attributes: gid114809,public X-Google-Thread: 103376,953e1a6689d791f6,start X-Google-Attributes: gid103376,public From: Sacha@easynet.fr (Vincent WEBER) Subject: Eiffel and Java Date: 1996/10/27 Message-ID: <550sm2$sn1@buggy.news.easynet.net> X-Deja-AN: 192610324 content-type: Text/Plain; charset=ISO-8859-1 organization: SITA mime-version: 1.0 newsgroups: comp.lang.eiffel,comp.lang.ada,comp.lang.sather,comp.object,comp.lang.java.advocacy,comp.lang.c++,comp.lang.smalltalk,comp.lang.clos,fr.comp.objet Date: 1996-10-27T00:00:00+00:00 List-Id: Hi everyone... I'm a developer in SITA (Soci�t� Internationale de T�l�comunications A�ronautiques). I'm forced to used C++, but I wanted to find something better and safer. That's why I had a look at Eiffel (Bertrand Meyer, Object-Oriented Software Construction) and Java. I appears to me that Eiffel is a great, simple, purely OO language, with nice safety features like assertions. Unfortunatly, It has not (yet ?) encounter the industrial success It should have. On the other hand, Java is not as much powerful as Eiffel, but thanks to Sun's marketing pressure, is very popular. I think it's a pity that Java didn't take all the good stuff from Eiffel, that is to say : - A true genericity mechanism, such as Eiffel constraint genericity. I'm afraid it would be too late to include this mecanism in Java now, since it would implie re-writing a great part of the API ( The vector class, for instance, is not generic, and just simulate a little genericity by accepting "Object" parameters). - A true and safe multiple inheritance mecanism. Although lots of people claim mutliple inheritance is tricky, Eiffel has a safe mecanism to handle the issue. Even if Java's interfaces are a nice feature to support multiple specification inheritance, there's no way to inherit more than one implementation, that can be necessary in some complex cases. - "Design By Contract", e.g built-in assertions (Preconditions, postconditions and class invariants) that are a great improvment to software quality. - Covariance, that is much more powerful than Java (and C++) invariance principle : in Eiffel attributes and routines in a child class can be redefined with children types. The "like" keyword is a simple and powerful way to make routines covariant. ( But even if Covariance is natural in lots of problems, Sather's contravariant mecanism seem very interesting too, has stronger and safer theorical bases... Sather also allow sepation between code inclusion and subtyping. Is it cleaner, or just more complicated that the universal inheritance mecanism ? any comment ?) But on the other hand, Java brings very nice (although not new) things to OO software construction : - Packages to handle name spacing. I think this mechanism (imported from Ada) is more elegant than Eiffel's (A separate sub-language, LACE) and is very well adapated to distribution of classes in the whole internet. - Concurrency, with built-in multithreading. This is very nice, like Ada's tasks... But I heard that Bertrand Meyer is working hard on a great concurrency mecanism for Eiffel. I hope it will come out soon :) - Methods multiple overloading, that allow for instance to have multiple constructors with the same name... The Eiffel solution -renaming parent methods- seem a little heavy to me. Even if I agree that since Eiffel allow multiple inheritance and Covariance for methods, multiple overloading in Eiffel would be ackward... - Maybe a richer visibily model ( methods can be public or private for the whole package, the children classes, the clients...). Eiffel, with its principle of openness, does not allow "private" attributes or routines hidden to the children classes... but allow to export selectively the features to specifically named classes. I don't know where the "truth" is... :) - Great networking, database support, great stuff in OO libraries. (JavaBeans). As a conclusion, I would say that Java had the opportunity to popularize Object-Oriented programming, distributing computing on the internet, but it lacks Eiffel's power... (Apart the syntax, the two languages are not that much different). So... Why don't Eiffel and Java merge ?? Maybe it would be a grat opportunity to build THE "perfect language..." (I'm kidding, I know there can't be ONE perfect language. But we can take the best of everything that exists to build something greater :) ) This idea might seem heretic to Bertrand Meyer, Eiffel vendors, and Sun :) But.. why not ? :) Both part could win in this issue : Java would be much more powerful, would rely on stronger theorical bases, and Eiffel would obtain a greater industrial success. Let's dream... ISE and Sun working together and sharing this market ? :)) Therefore I would be glad if people from ISE, SIG, Tower, Sun, or any people interested in this issue, react -constructively- on what I've just written. I would like to get different opinions about OO programming and future of the languages. I would also be interested by any information about both languages evolution in the future. I'm a strongly-typed believer :) But I would be interested by LISPers (CLOSers) and Smalltalkers' reactions as well :) By the way, one more thing : I just had a look at ADA 95 and it's "OO" model. Even if I admit it is powerful, I think it's very heavy. (The ADA 9X group had to keep all the Ada 93 stuff...:)). However, one thing interested me : Ada fanatics claim that the dot notation break the symetry of natural operation, and that Ada's model of dynamic bindings in all the parameters of a procedure is better (that is, writing for instance Add(VectorA, VectorB) instead of VectorA.Plus(VectorB). I don't know what to think about this controversy. Any idea ? Thanks to anyone that would help to elect my favourite language :) Currently, I believe that Eiffel is the best OOPL, even if the reality of industry force me to live the nightmare of C++ everyday :) Vincent Weber Developer - SITA group