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 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 Path: controlnews3.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.news.ucla.edu!ihnp4.ucsd.edu!news.ucsd.edu!not-for-mail From: Dr Chaos Newsgroups: comp.lang.c++,comp.lang.ada,comp.lang.eiffel,comp.object Subject: Re: OOP Language for OS Development Followup-To: comp.lang.eiffel Date: Tue, 4 May 2004 18:37:49 +0000 (UTC) Organization: Univ of Calif San Diego Message-ID: References: <95db0572.0404142153.431fd058@posting.google.com> <566e2bfb.0404181753.2844342f@posting.google.com> <4088D574.2020503@tele2.fr> <1082738747.300309@master.nyc.kbcfp.com> <3AFic.17011$eK3.5247@nwrdny01.gnilink.net> NNTP-Posting-Host: lyapunov.ucsd.edu X-Trace: news1.ucsd.edu 1083695869 28754 132.239.222.85 (4 May 2004 18:37:49 GMT) X-Complaints-To: usenet@news1.ucsd.edu NNTP-Posting-Date: Tue, 4 May 2004 18:37:49 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: controlnews3.google.com comp.lang.c++:1549 comp.lang.ada:250 comp.lang.eiffel:71 comp.object:684 Date: 2004-05-04T18:37:49+00:00 List-Id: On Sun, 25 Apr 2004 02:42:07 GMT, Hyman Rosen wrote: > Brian_Heilig wrote: >> You missed the constrained generic parameter. G -> T means that G is >> the generic type and it must conform to T. I don't think C++ templates >> can emulate constrained generics yet, but I could be wrong. > > They sort-of can, because there are ways to do the checks at compile time, > but no one really cares. Most C++ folks consider it a mistake to try to > limit generic parameters in this way, because it limits the usability of > templates for absolutely no reason. If the programmer puts it there, usually there is a reason. > If the template happens to work for > some class that doesn't conform to T, why should it be prevented from doing > so? At some point, C programmers learned many years ago that *( (OhWhatTheFuck*) p) = whatever; can often seem clever, but is not wise. >> C++ will never reach the expressive power of Eiffel, but then again, >> you can't make an Eiffel compiler solve factorials, so maybe you win? > > Yeah, whatever. Eiffel doesn't REQUIRE the type constraint.