Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: a question about the value of checking bounds

Author: David Hanley

Date: 11:11:21 01/22/03

Go up one level in this thread


Of course, bounds checking is a positive thing--i have been on large software
probjects with pernicious bugs due to out-of-bounds errors.  No matter how
careful you are, the bounds checker will get you sometimes.  It has certianly
saved me significant time when i use a bounds-checked language.

As for the speed tradeoff, certianly there is one.  The best of both worlds is
of course when you can use bound checking for debugging and testing, then turn
it off for release versions, if it's necessary.

As for why C does not do it, think about it.  How?  In general it's very hard to
have bounds checked arrays in C because of how pointers work.  A pointer into
the middle of an array is still an array.

dave



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.