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-Thread: 103376,703c4f68db81387d X-Google-Thread: 109fba,703c4f68db81387d X-Google-Thread: 115aec,703c4f68db81387d X-Google-Thread: f43e6,703c4f68db81387d X-Google-Attributes: gid103376,gid109fba,gid115aec,gidf43e6,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!12.120.4.37!attcg2!attcg1!ip.att.net!news.binc.net!kilgallen From: Kilgallen@SpamCop.net (Larry Kilgallen) Newsgroups: comp.lang.ada,comp.lang.c++,comp.realtime,comp.software-eng Subject: Re: Teaching new tricks to an old dog (C++ -->Ada) Date: 14 Mar 2005 10:30:19 -0600 Organization: LJK Software Message-ID: References: <4229bad9$0$1019$afc38c87@news.optusnet.com.au> <1110377260.350158.58730@z14g2000cwz.googlegroups.com> <1136bh3li136dac@corp.supernews.com> NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 1110817799 21099 192.135.80.34 (14 Mar 2005 16:29:59 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Mon, 14 Mar 2005 16:29:59 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:9372 comp.lang.c++:45575 comp.realtime:1455 comp.software-eng:5021 Date: 2005-03-14T10:30:19-06:00 List-Id: In article , "Dr. Adrian Wrigley" writes: > On Sat, 12 Mar 2005 12:59:31 -0500, CTips wrote: > >> Robert A Duff wrote: >> >>> Kilgallen@SpamCop.net (Larry Kilgallen) writes: >>> >>> >>>>Even Bliss has nested functions. What Ada has that Pascal has in addition >>>>to nested functions is uplevel addressing, allowing an inner function to >>>>access data declared in outer scopes. >>> >>> >>> Heh? Pascal has that. In fact, practically every programming language >>> outside the C family has this feature. It's quite useful -- almost >>> essential in multi-threaded programs. >>> >>> - Bob >> >> Yeah, and don't ask what it costs you. I'd carefully forgotten about all >> the grungy details about displays and static/dynamic chaining, and you >> had to remind me. I particularily like solutions that reserves a >> register for the top-of-display/top-of-static-chain. Thats right - blow >> away a register for that. And then of course the cost of >> maintaining/walking those structures. >> >> If you need thread-private storage, there are *much* cheaper solutions. But what if you actually need uplevel addressing ? Why would one presume that users of uplevel addressing actually need thread-private storage ? Thread-private storage would give just a single instance per thread, not multiple nested instances per thread. > isn't uplevel addressing usually zero cost? Are you saying it is > expensive whenever you use it? Or expensive on all programs, whether > or not it is used? Is it absent from C++ because of cost?