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 09:45:48 PST Path: archiver1.google.com!news1.google.com!news.glorb.com!in.100proofnews.com!in.100proofnews.com!news-out.visi.com!petbe.visi.com!news.octanews.net!ash.uu.net!spool.news.uu.net!not-for-mail Date: Fri, 23 Apr 2004 12:45:47 -0400 From: Hyman Rosen User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.c++,comp.lang.ada,comp.lang.eiffel,comp.object Subject: Re: OOP Language for OS Development References: <95db0572.0404142153.431fd058@posting.google.com> <566e2bfb.0404181753.2844342f@posting.google.com> <4088D574.2020503@tele2.fr> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: KBC Financial Products Message-ID: <1082738747.300309@master.nyc.kbcfp.com> Cache-Post-Path: master.nyc.kbcfp.com!unknown@nightcrawler.nyc.kbcfp.com X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) NNTP-Posting-Host: 204.253.250.10 X-Trace: 1082738747 28679 204.253.250.10 Xref: archiver1.google.com comp.lang.c++:31301 comp.lang.ada:7428 comp.lang.eiffel:727 comp.object:11046 Date: 2004-04-23T12:45:47-04:00 List-Id: Georg Bauhaus wrote: > How would you write "once" routines in C++? With a static method containing a static value, of course. class UponATime { static double Once(/* args */) { static double value = /* some calculation */; return value; } }; It appears from my looking up what once functions do, that arguments to the call are irrelevant for determining whether it should be re-executed. If so, that's another example of a hideous language design choice made by Eiffel. > How about the fine grained visibility control (where each feature > can be made visible to only a specified set of types)? Speaking of hideous design decisions. This whole concept of classes having fine-grained dictatorial control over whom they allow access to their innards is more than a little silly. > They are different I think. Can you express > deferred class C [P -> T] > feature foo(x: P): P is deferred end > end -- C > in C++? Sure. You just don't define the method, and if it gets used, the linker will complain. Or if it's virtual, then you can make it abstract. template struct C { T foo(T x); virtual T bar(T x) = 0; };