Re: The Errno Story

Alastair Reid <[email protected]>
Newsgroups gmane.comp.lang.haskell.ffi
Organization Reid Consulting (UK) Ltd
Message-ID <[email protected]>
> John's first suggested alternative above seems very appealing to me, as it
> seems neatly to fix the fundamental design flaw in `errno`: that
> determining the success/failure of a system call is separated from the call
> itself. 

Slightly off-topic but it reminds me of one of my pet peeves with C...

I think the design flaw is in C and that is merely reflected in the C library.  
If you listen to the propaganda, C is just a portable assembly language and, 
in many ways, C is just that.  One of the big differences though is that in 
assembly language, there is no problem returning multiple values -just load 
up multiple registers or put multiple values on the stack- but in C, there is 
no good way to return multiple values.

--
Alastair Reid
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.