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



_______________________________________________
L4-hurd mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/l4-hurd

Reply via email to