From owner-freebsd-hackers Wed Jul 31 08:27:10 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA05989 for hackers-outgoing; Wed, 31 Jul 1996 08:27:10 -0700 (PDT) Received: from MindBender.HeadCandy.com (root@mindbender.headcandy.com [199.238.225.168]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id IAA05982 for ; Wed, 31 Jul 1996 08:26:58 -0700 (PDT) Received: from localhost.HeadCandy.com (michaelv@localhost.HeadCandy.com [127.0.0.1]) by MindBender.HeadCandy.com (8.7.5/8.7.3) with SMTP id IAA05309; Wed, 31 Jul 1996 08:26:41 -0700 (PDT) Message-Id: <199607311526.IAA05309@MindBender.HeadCandy.com> X-Authentication-Warning: MindBender.HeadCandy.com: Host michaelv@localhost.HeadCandy.com [127.0.0.1] didn't use HELO protocol To: Michael Hancock cc: FreeBSD Hackers Subject: Re: kernel assertions (Rev. 1) In-reply-to: Your message of Wed, 31 Jul 96 23:50:38 +0900. Date: Wed, 31 Jul 1996 08:26:37 -0700 From: "Michael L. VanLoon -- HeadCandy.com" Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >I'd be happy either way. The point I was trying to make was that REQUIRE2 >could replace the "tentative looking" argument checking in the code that >often manifests itself in the form above. > >REQUIRE2 would also hopefully induce people to consistently do simple >argument checking, because there is no overhead in the production code. [...] >Let's go for HIGHER QUALITY!!! I agree 125%. My production code at work is literally filled with asserts. However, programmers first have to change their mindset from "I will assume most code is non-buggy, and I will find the few bugs that creep in when they happen" to "I will assume code has bugs, always, and I will write my code in a way that helps me find bugs, even when I'm not looking for them". Asserts (whatever they are called) are an exceptionally helpful tool for that, and as you say, they only slow down the machine when you actually turn them on. ----------------------------------------------------------------------------- Michael L. VanLoon michaelv@HeadCandy.com --< Free your mind and your machine -- NetBSD free un*x >-- NetBSD working ports: 386+PC, Mac 68k, Amiga, Atari 68k, HP300, Sun3, Sun4/4c/4m, DEC MIPS, DEC Alpha, PC532, VAX, MVME68k, arm32... NetBSD ports in progress: PICA, others... Roll your own Internet access -- Seattle People's Internet cooperative. If you're in the Seattle area, ask me how. -----------------------------------------------------------------------------