Re: C++ interface to glib???? (I do one)



On Thu, Feb 11, 1999 at 04:26:14PM -0600, Havoc Pennington wrote:
> 
> GDate has some possible errors; I've already wrapped it fairly nicely but
> I did not use exceptions, the C++ class requires you to check that the
> date is .valid() just like the C interface.

Don't think thats an error. Calling .valid() allot from assert statment
vill make bugs manefest themself in debug code. At the same time
production code will be slim and fast. 

Exception is handy if all this things is true:

 1) The error is hard (imposably) to solve localy

 2) The error is hard to else communicate to the applikation

 3) The error is hard / tideus to avoid from the applikation

The existance of .valid() makes 3 (and possably 2) false. In this case
it will be more work to properly handel an exception then to call
.validate().

> Feel free to borrow my G_Date class...

Thanks, this start to become an collekting of peaces rather then
devolopment ;-)

Hope I'l find time to start soon...

/Lars



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]