[Mono-list] Socket code.

Michal Moskal malekith@pld-linux.org
Mon, 23 Feb 2004 12:08:58 +0100

On Mon, Feb 23, 2004 at 08:51:36PM +1100, Iain McCoy wrote:
> On Mon, 2004-02-23 at 19:37, Michal Moskal wrote:
> > This ain't C -- for errors you should get exception, not -1.
> Not so. According to microsoft's guidelines, it depends on the error -
> if it's an error that you expect to get often, there should be a return
> code to indicate it. This is because of the performance cost of
> exceptions.

Yes, but not for NetworkStream.Read(). 

Beside I wonder why exceptions cannot be fast enough. Using exceptions
is sometimes very natural way of expression some algorithms, especially
in functional languages. I have to benchmark it some day.

: Michal Moskal :: http://www.kernel.pl/~malekith :: GCS !tv h e>+++ b++
: When in doubt, use brute force. -- Ken Thompson :: UL++++$ C++ E--- a?