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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no 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 08:44:51 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!psinet-eu-nl!psiuk-p4!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Have you ever had a bug caused by... Date: Thu, 25 Oct 2001 11:23:05 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9r9aoh$6fm$1@nh.pace.co.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> <3BD7DF3B.1E5F435B@brighton.ac.uk> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1004023377 6646 136.170.200.133 (25 Oct 2001 15:22:57 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 25 Oct 2001 15:22:57 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:15188 Date: 2001-10-25T15:22:57+00:00 List-Id: Never said I was in favor of it - just observing that the C design philosophy was to make an extremely simple compiler that didn't put in anything you didn't specifically create. It is really a high level assembler. Designing in C, I find myself utilizing the Harley Davidson Design Principle: "If it breaks, make it bigger. If it sticks out, chrome it!" :-) I think that for easily 75% or more of the programs ever written in the world today, a compiler could safely leave in all sorts of range checks and other runtime safety features and nobody would ever notice they were there from a performance standpoint. If a compiler can be smart enough to eliminate some of the checks on its own - great! If the compiler will let me turn them off when I might be in those 25% of the cases where it matters, fine! Ada certainly makes all of that possible. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "John English" wrote in message news:3BD7DF3B.1E5F435B@brighton.ac.uk... > > 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. >