Date: Mon, 01 Jan 2018 10:03:12 +0000 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: Mark Millard <markmi@dsl-only.net> Cc: "Rodney W. Grimes" <freebsd-rwg@pdx.rh.CN85.dnsmgr.net>, FreeBSD Hackers <freebsd-hackers@freebsd.org> Subject: Re: Is it considered to be ok to not check the return code of close(2) in base? Message-ID: <69781.1514800992@critter.freebsd.dk> In-Reply-To: <559541DD-3287-4473-B7DE-B4DDC6860DF7@dsl-only.net> References: <201801010305.w0135luG084158@pdx.rh.CN85.dnsmgr.net> <559541DD-3287-4473-B7DE-B4DDC6860DF7@dsl-only.net>
next in thread | previous in thread | raw e-mail | index | archive | help
-------- In message <559541DD-3287-4473-B7DE-B4DDC6860DF7@dsl-only.net>, Mark Milla= rd wr ites: >"assert" indicates optional code, not required >code. (This is despite its name.) Assert statements are not debugging, although they greatly help debugging, they are an integral part of the program, which documents for the maintainers and the running system what assumptions are being made. Who ever added "#ifndef NDEBUG" not only failed Sensible Naming 101, they also totally misunderstood the nature of assert() as a programming construct. -- = Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe = Never attribute to malice what can adequately be explained by incompetence= .
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69781.1514800992>