From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] ... in the Kingdom of Sources From: "rob pike, esq." In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Thu, 11 Sep 2003 08:48:43 -0700 Topicbox-Message-UUID: 30ff085c-eacc-11e9-9e20-41e7f4b1d025 > i'm certainly glad that when i accidentally browse a piece of latin-1 > text in plan 9, i get almost all the text, with an occasional error > character thrown in. precisely. the approach taken by the C standard implies you're supposed to error check the conversion and presumably yell about it, maybe exit. but the great majority of text processing code is interactive - editors, browsers, terminal programs - and must soldier on. the `error rune' solution not only solves the problem of soldiering on, it provides a way to yell and takes no code at all in the application. (if you really want to stop processing on errors, it's still a simple check; it's just that you almost never have to bother to check and i can't think of a single program that does.) -rob