From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4f2ff548f619cc58 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: End of File for streams Date: 2000/04/18 Message-ID: <8dgknk$b81$1@nnrp1.deja.com>#1/1 X-Deja-AN: 612515857 References: <8df15j$e4b$1@trog.dera.gov.uk> <38FB5996.C7CCB816@maths.unine.ch> <8dg55l$us3$1@trog.dera.gov.uk> X-Http-Proxy: 1.0 x43.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Tue Apr 18 03:28:05 2000 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) Date: 2000-04-18T00:00:00+00:00 List-Id: In article <8dg55l$us3$1@trog.dera.gov.uk>, "Kevin Rigotti" wrote: > OK, its nice to have some external confirmation occasionally. I don't get to > see much code written by other people here ... > > In my own defence (but thanks Brian) > 1) as an impressionable undergrad I was brought up on a diet of functional > programming so using exceptions for control flow seems decadent :-) > > 2) I don't like using exceptions for non-exceptional behavior. Just a > personal foible. You need to have the right view of what non-exceptional behavior means. For the loop doing the reading, the EOF *is* an exceptional case, since the read fails. At one level of abstraction higher, this is not an exceptional situation, which is why we handle it locally at the lower level of abstraction, and then do not propagate the exception to a higher level. Sent via Deja.com http://www.deja.com/ Before you buy.