Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jul 1996 08:26:37 -0700
From:      "Michael L. VanLoon -- HeadCandy.com" <michaelv@HeadCandy.com>
To:        Michael Hancock <michaelh@cet.co.jp>
Cc:        FreeBSD Hackers <Hackers@freebsd.org>
Subject:   Re: kernel assertions (Rev. 1) 
Message-ID:  <199607311526.IAA05309@MindBender.HeadCandy.com>
In-Reply-To: Your message of Wed, 31 Jul 96 23:50:38 %2B0900. <Pine.SV4.3.93.960731232342.14875B-100000@parkplace.cet.co.jp> 

next in thread | previous in thread | raw e-mail | index | archive | help

>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.
-----------------------------------------------------------------------------



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607311526.IAA05309>