Date: Tue, 9 Dec 1997 11:43:31 -0500 (EST) From: Charles Henrich <henrich@crh.cl.msu.edu> To: perhaps@yes.no, freebsd-current@freebsd.org Subject: Re: VM system info Message-ID: <199712091643.LAA04851@crh.cl.msu.edu> References: <66jnt0$ddh$1@msunews.cl.msu.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
In lists.freebsd.current you write:
>(4) Code is not commented. If necessary, the function comment can
> contain a reference to external documentation that explain the
> code. This should only happen for core functionality that can't
> be be implemented simply; in other cases, either drop the
> functionality or re-implement until it is simple. If something is
> so complex that it needs external documentation, it had better be
> non-changing.
YUCK! All code should be commented! Just to make things entirely clear, just
because the author things this code "is so simple, everyone must understand
it" does not make it so.
>(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.
-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?199712091643.LAA04851>
