Xref: utzoo comp.emacs:4935 comp.unix.microport:2349 Path: utzoo!attcan!uunet!ateng!chip From: chip@ateng.ateng.com (Chip Salzenberg) Newsgroups: comp.emacs,comp.unix.microport Subject: Re: GNU Emacs Message-ID: <1988Dec21.171023.24690@ateng.ateng.com> Date: 21 Dec 88 22:10:22 GMT References: <828@ubu.warwick.UUCP> <28173@tut.cis.ohio-state.edu> <10960@bigtex.cactus.org> <8791@wright.mips.COM> <1138@csuchico.EDU> <429@lehi3b15.UUCP> <121@cbw1.UUCP> <8525@alice.UUCP> <448@myab.se> <8547@alice.UUCP> Organization: A T Engineering, Tampa, FL Lines: 22 In article <448@myab.se> lars@myab.UUCP (Lars Pensj|) reminds us that all programs should check return values of system calls, such as write(). This is obviously good policy. However, according to debra@alice.UUCP (Paul De Bra): >... unfortunately very few programs actually do this for read and write... >Reasons are obvious: programmers are a bit lazy, and the programs become >smaller and faster if you don't check. (so not checking also makes your >system look better in benchmarks which use standard utilities...) This misconception about "efficiency" is all too common. Checking the return values of system calls takes some programmer time during coding, but this is more than returned during debugging and use. ("A bit lazy"? Try "lazy enough to get fired".) And as for execution speed: how long does an integer comparison take? Certainly not enough to worry about, once you've accepted the overhead of a kernel trap. And this fellow works in AT&T Research. Sigh. -- Chip Salzenberg or A T Engineering Me? Speak for my company? Surely you jest! "It's no good. They're tapping the lines."