From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4bb7193815221f5e70d7548882f9109a@vitanuova.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] same functions everywhere From: rog@vitanuova.com In-Reply-To: <3EB9E853.7040405@null.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Thu, 8 May 2003 14:12:38 +0100 Topicbox-Message-UUID: a3a24b7c-eacb-11e9-9e20-41e7f4b1d025 DAGwyn@null.net: > rog@vitanuova.com wrote: > > (BTW, getc doesn't use in-band signalling, and even if it did, > > tuples are a much cleaner solution than exceptions, IMHO). > > In C, it certainly does. EOF is returned instead of data > when end-of-file is detected. depends on how you look at the return value of getc. there's no ambiguity between the different kinds of return value. one can consider the return value from getc to be "character X or no character" in just the same way that a function returning a pointer to a struct can be considered to return "pointer to struct or nil". it's a perfectly good kind of data - EOF is only out of band if one doesn't consider "not EOF" to be part of the normal getc return value.