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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5d71,d275ffeffdf83655 X-Google-Attributes: gidf5d71,public X-Google-Thread: 146b77,d275ffeffdf83655 X-Google-Attributes: gid146b77,public X-Google-Thread: 103376,d275ffeffdf83655 X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,d275ffeffdf83655 X-Google-Attributes: gid109fba,public From: "Fredric L. Rice" Subject: Re: Ada vs C++ vs Java Date: 1999/02/09 Message-ID: <36BF875B.E0BFFC0C@linkline.com>#1/1 X-Deja-AN: 442226871 Content-Transfer-Encoding: 7bit References: <369C1F31.AE5AF7EF@concentric.net> <369DDDC3.FDE09999@sea.ericsson.se> <369e309a.32671759@news.demon.co.uk> <77ledn$eu7$1@remarQ.com> <77pnqc$cgi$1@newnews.global.net.uk> <8p64spq5lo5.fsf@Eng.Sun.COM> <77t3ld$nou$1@nnrp1.dejanews.com> <79ce4s$lfq$1@nnrp1.dejanews.com> <79chc7$ko6@drn.newsguy.com> <36BB746E.B1A8AF8@averstar.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: The Skeptic Tank MIME-Version: 1.0 Newsgroups: comp.lang.ada,comp.lang.c++,comp.vxworks,comp.lang.java Date: 1999-02-09T00:00:00+00:00 List-Id: Tucker Taft wrote: > arrays -- no bounds checking That's easily enough fixed with operator overloading, of course, yet I have to agree totally on this particular attribute of arrays with C++. The origin 0 of C++ has plagued old code that I've had to debug and fix over the years and, because C is an origin 0 language, I have found a lot of code that merely oversteps its array bounds by one. To alleviate the problem, believe it or not, I usually always have a habit of allocating one more than I need for an array. Additionally, when I'm working on isolating a curious bug, I always suspect arrays allocated on a function's stack first. Traditionally, even more than wild pointers, that's been the most numerous problem I've seen when debugging old code.