l4-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IDL issue


From: Jonathan S. Shapiro
Subject: Re: IDL issue
Date: Mon, 09 Jul 2007 15:03:34 -0400

On Mon, 2007-07-09 at 18:10 +0200, Neal H. Walfield wrote:
> At Sun, 08 Jul 2007 00:03:10 -0400,
> Jonathan S. Shapiro wrote:
> > I am honestly not sure what to do here, and I would appreciate input.
> > The bottom line, I think, is that *any* failure to check results is
> > potentially fatal in this type of code no matter which way the IDL is
> > generated. Either idiom can be maintained by a careful programmer.
> 
> An interesting counterexample may be that of POSIX file streams.
> Instead of checking after every read or write for an error, the
> programmer may just check if an error occurred at the end of a
> sequence of operations using ferror.  This can greatly simplify the
> code.

Yes. However, note that this trick "works" only because UNIX system
calls have always returned scalars, and all of those scalars have tended
to take the form of mostly-ignorable "status output". I understand why
it seems to work (notably exception of terminal I/O where read/write
lengths really need to be checked), but it doesn't seem to generalize.

-- 
Jonathan S. Shapiro, Ph.D.
Managing Director
The EROS Group, LLC





reply via email to

[Prev in Thread] Current Thread [Next in Thread]