Afficher un message
Vieux 04/02/2008, 19h00   #14
Ulrich Eckhardt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Kelsey admits Linux SW is fatally flawed

Kelsey Bjarnason wrote:
> [snips]
>
> On Fri, 01 Feb 2008 07:46:05 +0100, Ulrich Eckhardt wrote:
>
>> Now, glib offers both allocation functions that return NULL on OOM (the
>> 'try' ones) and functions that never return NULL but instead abort, so
>> the competent programmer can choose which one is appropriate for his
>> job. Where is the problem with that?

>
> Suppose I use glib to develop an application. Glib itself regularly
> fails to even document the return of an allocation failure - see almost
> any library routine which requires or uses allocations.


An example would have been nice, I guess g_error_new would serve as one.
That said, there is no g_error_try_new which would explicitly report OOM by
returning NULL, so assuming a certain consistency I would expect this to
abort. Aborting without a choice is a bad idea though, as is lack of
consistency.

I think I get the idea of what some people consider bad about glib now.
However, I didn't find it in the link the OP was giving.

cheers

Uli

  Réponse avec citation
 
Page generated in 0,05104 seconds with 9 queries