Path: csiph.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: John Ames Newsgroups: comp.os.linux.misc Subject: Re: VMS Date: Wed, 23 Jul 2025 08:04:07 -0700 Organization: A noiseless patient Spider Lines: 20 Message-ID: <20250723080407.00004a8a@gmail.com> References: <20250625093213.00002ec2@gmail.com> <20250625094418.00007fd2@gmail.com> <105iv02$3cuhr$2@dont-email.me> <20250721091242.00007573@gmail.com> <20250721133148.00007cc6@gmail.com> <105pv2t$77mv$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Date: Wed, 23 Jul 2025 17:04:11 +0200 (CEST) Injection-Info: dont-email.me; posting-host="d1fddc984b9daff4cec7569e2db0c386"; logging-data="1023999"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18eZou9epwK72GD4v1pBzaqQGbrKiO4NLM=" Cancel-Lock: sha1:WLjrkE/3Mt46hktCtw640gUVr54= X-Newsreader: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) Xref: csiph.com comp.os.linux.misc:69854 On Wed, 23 Jul 2025 07:22:21 +0100 Pancho wrote: > You appear to be advocating for using an "assert" type paradigm. This > doesn't need to be coupled to actual reservation size. I'm not so much advocating for any specific coding practice in any specific language - asserts work, but so does designing algorithms such that bounds violations can never happen (e.g. #define BUFFER_BOUND and then loop from 0 to BUFFER_BOUND - if there's no other indexing, it will never go off the end, unless the compiler is just broken,) where possible. My point is simply that, unless you're using a language where bounds- checking is provided for "free" behind the scenes, boundary errors will *always* be a hazard, and working in conscious recognition of that is a far more responsible approach than relying on superstitious warding practices - even if the practices in question may be valid design choices for other reasons.