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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,31c0457c1c47fc2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-25 04:29:35 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!lon1-news.nildram.net!195.8.68.195.MISMATCH!newspeer.clara.net!news.clara.net!peer.news.eu-x.com!server2.netnews.ja.net!newshost.central.susx.ac.uk!news.bton.ac.uk!not-for-mail From: John English Newsgroups: comp.lang.ada Subject: Re: Have you ever had a bug caused by... Date: Thu, 25 Oct 2001 10:45:31 +0100 Organization: University of Brighton Message-ID: <3BD7DF3B.1E5F435B@brighton.ac.uk> References: <27085883.0110191714.784d3d25@posting.google.com> <9r25o0$fla$1@nh.pace.co.uk> <9r2f090nu2@drn.newsguy.com> <9r3rdt$d6f$1@nh.pace.co.uk> NNTP-Posting-Host: pc2je.it.bton.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: saturn.bton.ac.uk 1004005872 27003 193.62.183.154 (25 Oct 2001 10:31:12 GMT) X-Complaints-To: news@bton.ac.uk NNTP-Posting-Date: 25 Oct 2001 10:31:12 GMT X-Mailer: Mozilla 4.7 [en-gb] (Win95; U) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:15173 Date: 2001-10-25T10:31:12+00:00 List-Id: Marin David Condic wrote: > ... Its really just a difference in mentality. The C > mindset being "Don't burden the code with anything that doesn't need to be > there so we get maximum possible efficiency". Odd, considering how much easier it is for a compiler to optimise out unnecessary range checks than for a human to try and identify safe situations and leave out the checks... It's easier for a human to wrap the variable access in a function which always range checks and which the compiler can't optimise away, or to omit checking altogether. ----------------------------------------------------------------- John English | mailto:je@brighton.ac.uk Senior Lecturer | http://www.comp.it.bton.ac.uk/je Dept. of Computing | ** NON-PROFIT CD FOR CS STUDENTS ** University of Brighton | -- see http://burks.bton.ac.uk -----------------------------------------------------------------