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!wns14feed!worldnet.att.net!12.120.4.37!attcg2!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 19:04:53 -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> <113bvkqbb8q0038@corp.supernews.com> NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 1110848667 29180 192.135.80.34 (15 Mar 2005 01:04:27 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Tue, 15 Mar 2005 01:04:27 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:9419 comp.lang.c++:45725 comp.realtime:1499 comp.software-eng:5067 Date: 2005-03-14T19:04:53-06:00 List-Id: In article <113bvkqbb8q0038@corp.supernews.com>, CTips writes: > On some implementations (on RISC architectures) a register is reserved > for the static-chain. This means one less register for *every* function > (or maybe only for enclosed functions?) when used with a language that > support this kind of nested functions. It does not have much to do with whether one language supports it, so long as _some_ language supports it. If I have a call chain: Ada => C => Ada that second Ada subprogram might want to access a variable in the first Ada subprogram. So the C implementation must pass the context along. As I understand it, that is the job of the "Bound Procedure Value" construct in the VMS Calling Standard. Such relationships between languages must be defined by the calling standard for the platform, meaning that the C compiler should honor it as well. I imagine that HP Ada and HP Pascal interact properly in this regard -- I have no idea about HP C. > C++ probably left it out because of its C heritage, while Ada probably > dropped it in because of its Pascal heritage. IMHO, its probably not > worth the cost. If that is your opinion, I would say you have not done enough programing in a language where it is provided.