[Gtk-sharp-list] Gdk.Color, further comments.

Charles Iliya Krempeaux charles@reptile.ca
04 Mar 2003 10:00:55 -0800


Hello,

On Tue, 2003-03-04 at 07:47, Miguel de Icaza wrote:

[...]

> > Personally I prefer the approach you have that throws when things have gone wrong.
> > If an API user doesn't do any error checking at all, then throwing will alert them when something goes wrong. Whereas an unchecked errno remains forever silent until the program crashes as a result of the failure, but in a subtle way some time later...
> 
> It is definitely possible to do this, but again, exceptions are
> miss-used, and you pay a very high price for common file-system
> operations like probing.  Again, this is one of the reasons why they are
> trying to get rid of them.

Well, if "probing" is the only reason you want to get rid of exceptions,
then maybe we should create a API specifically for "probing".  (Is that
the only reason to NOT use exceptions?)

For stuff like the "End of File", these things are already "returned".
(Instead of being thrown.  It is only the "unusual" errors that
are being thrown.)

Alternatively, I could create 2 different implementation of
System.IO.Stream (and other classes).  One would use exceptions and
the other wouldn't.

Or, I could make one implementation.  But you could configure how
the class reports errors.

What does everyone think about that????


See ya

-- 
     Charles Iliya Krempeaux, BSc
     charles@reptile.ca

________________________________________________________________________
 Reptile Consulting & Services    604-REPTILE    http://www.reptile.ca/