Date: Tue, 9 Dec 1997 12:40:16 -0500 From: Charles Henrich <henrich@crh.cl.msu.edu> To: Poul-Henning Kamp <phk@critter.freebsd.dk> Cc: perhaps@yes.no, freebsd-current@FreeBSD.ORG Subject: Re: VM system info Message-ID: <19971209124016.19617@crh.cl.msu.edu> In-Reply-To: <772.881687925@critter.freebsd.dk>; from Poul-Henning Kamp on Tue, Dec 09, 1997 at 06:18:45PM %2B0100 References: <199712091643.LAA04851@crh.cl.msu.edu> <772.881687925@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On the subject of Re: VM system info, Poul-Henning Kamp stated: > >>(5) Code prerequisites is documented through assert() or similar > >>functionality. > > > >Egads! I wish assert() was thrown down to the pits of hell. Its a > >programmers cop out. In almost no circumstance does one ever need to > >assert . If you find an error condition, COPE as best you can! Especially > >in the kernel. > > Well, suffice to say that I disagree more than words can express. > > In particular in a kernel should assert be used to guard against "bad news", > but lets just remember that an assert can be as stealthy as a syslog entry > or as intrusive as a panic. It all depends exactly how bad. I am referring to the assert() function which says if this fails, panic.. Thats (in most cases) not a good approach. Now I agree that one should test all conditions all the time to make sure the actions your about to take are sane. -Crh Charles Henrich Michigan State University henrich@msu.edu http://pilot.msu.edu/~henrich
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19971209124016.19617>