Re: IDL issue

"Jonathan S. Shapiro" <[email protected]>
Newsgroups gmane.os.hurd.l4
Organization The EROS Group, LLC
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.