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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,e0a59694a441eb7b X-Google-Thread: 103376,e0a59694a441eb7b X-Google-Thread: fac41,e0a59694a441eb7b X-Google-Thread: 1108a1,e0a59694a441eb7b X-Google-Attributes: gid109fba,gid103376,gidfac41,gid1108a1,public X-Google-ArrivalTime: 2004-04-23 07:30:35 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: stevenwurster@lycos.com (Steven Wurster) Newsgroups: comp.lang.c++,comp.lang.ada,comp.lang.eiffel,comp.object Subject: Re: OOP Language for OS Development Date: 23 Apr 2004 07:30:34 -0700 Organization: http://groups.google.com Message-ID: References: <95db0572.0404142153.431fd058@posting.google.com> <566e2bfb.0404181753.2844342f@posting.google.com> <4088D574.2020503@tele2.fr> NNTP-Posting-Host: 192.35.35.34 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1082730635 6423 127.0.0.1 (23 Apr 2004 14:30:35 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 23 Apr 2004 14:30:35 +0000 (UTC) Xref: archiver1.google.com comp.lang.c++:31273 comp.lang.ada:7424 comp.lang.eiffel:723 comp.object:11035 Date: 2004-04-23T07:30:34-07:00 List-Id: Calum wrote in message news:... > > I am in no doubt that Eiffel is cleaner safer language, however that's > not quite the same as power. > > So what can you express in Eiffel that cannot be expressed in C++? > [Actually, resolving name-clashes in multiple inheritance is one, > contracts is another.] But are these fundamentally difficult in C++, or > just a little uglier? Contracting is fundamentally difficult in C++, because adhering to the inheritance rules of contracting is not easily accomplished. Doing so requires a lot of preprocessor directives/macros, and makes the code extremely ugly. Resolving name clashes in C++ *can* be difficult if there are a lot of them, and you need to make sweeping changes. Automated search and replace can help, of course, but may not do everything you need. Otherwise, it's just flat out ugly in C++. Eiffel supports selective exporting, covariant argument redefinition, constrained genericity, and has polymorphism by default without any added performance penalty. C++ supports none of these. Eiffel also fully supports the Open Closed Principle, while C++ does not (due to requirement of virtual keyword and private access limitations). None of these issues really affect the choice about whether one can develop an OS with them or not. > Are parameterized types in Eiffel as flexible as those in C++? Not really. Eiffel supports constrained genericity, but it does not support expression templates like C++ does. Of course, expression templates are really a side-effect in C++, as they were not part of the original intention. They are great for performance and expressive power, but they are damn ugly. :-) Steve