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: 115aec,703c4f68db81387d X-Google-Thread: f43e6,703c4f68db81387d X-Google-Attributes: gid103376,gid115aec,gidf43e6,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!proxad.net!proxad.net!62.253.162.218.MISMATCH!news-in.ntli.net!newsrout1-win.ntli.net!ntli.net!newspeer1-win.ntli.net!newsfe5-gui.ntli.net.POSTED!53ab2750!not-for-mail From: "Dr. Adrian Wrigley" Subject: Re: Teaching new tricks to an old dog (C++ -->Ada) User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) Message-Id: Newsgroups: comp.lang.ada,comp.realtime,comp.software-eng References: <4229bad9$0$1019$afc38c87@news.optusnet.com.au> <1110032222.447846.167060@g14g2000cwa.googlegroups.com> <871xau9nlh.fsf@insalien.org> <3SjWd.103128$Vf.3969241@news000.worldonline.dk> <87r7iu85lf.fsf@insalien.org> <1110052142.832650@athnrd02> <1110284070.410136.205090@o13g2000cwo.googlegroups.com> <395uqaF5rhu2mU1@individual.net> <112rs0bdr2aftdf@corp.supernews.com> <1inxxr988rxgg$.1w9dedak41k89.dlg@40tude.net> <112s1r0rf0o8nca@corp.supernews.com> <112sonip5v4dca6@corp.supernews.com> <112t3de6fu04f38@corp.supernews.com> <422ee0ce$0$1091$9b4e6d93@newsread2.arcor-online.net> <112v9p788s1684d@corp.supernews.com> <42307820$0$26539$9b4e6d93@newsread4.arcor-online.net> <1132e5g2cor3oe2@corp.supernews.com> <42329994$0$1093$9b4e6d93@newsread2.arcor-online.net> <1135t9id2cpip06@corp.supernews.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: Mon, 14 Mar 2005 15:38:04 GMT NNTP-Posting-Host: 81.100.88.147 X-Complaints-To: http://www.ntlworld.com/netreport X-Trace: newsfe5-gui.ntli.net 1110814684 81.100.88.147 (Mon, 14 Mar 2005 15:38:04 GMT) NNTP-Posting-Date: Mon, 14 Mar 2005 15:38:04 GMT Organization: ntl Cablemodem News Service Xref: g2news1.google.com comp.lang.ada:9365 comp.realtime:1449 comp.software-eng:5014 Date: 2005-03-14T15:38:04+00:00 List-Id: On Sat, 12 Mar 2005 08:56:37 -0500, CTips wrote: > As for automatically or manual checking - I add a lot of checking code > to my programs [see http://users.bestweb.net/~ctips ]. However, I do > try to follow a few rules: > - The checking code can be disabled via a compile-time flag > - Enabling/disabling checking code does not change the memory layout of > objects. > Ada, I believe, violates the second rule. If you disable bounds > checking, it will replace handles with straight pointers, which can > result in considerably different memory images. I've never heard of an Ada compiler changing memory layout under such circumstances! Even if it did, we're discussing languages, not implementations - if the semantics are met, why would it matter? I didn't think GNAT uses handles for arrays in the first place! Whenever I have checked the code, data have always been accessed directly, with a simple pointer. If the bounds are relevant, a second pointer is used. Usually either the bounds pointer is important (and would be needed in normal as an extra parameter or two in C code), or it disappears. Fat pointers are not handles(?) The use of handles seems to be a big concern for you. When you used (or evaluated) Ada for real applications, have you: 1) found that the code is handle based? 2) this caused a performance or other problem? (which compiler?) -- Adrian