Re: [Gimp-developer] Re: your so called optimizations and why we don't like them

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

 



   From: degger@xxxxxxx
   Date: Tue, 4 Dec 2001 02:01:22 +0100 (CET)

   On  4 Dec, Sven Neumann wrote:

   > Using them for error reporting is definitely a bad idea. Using a
   > negative value to indicate that a value has not been set and needs to
   > be computed is IMO a reasonable usage.

   On a side note: I found it quite often that the return value is set
   to something in case it's real value couldn't be computed, this is
   also some form of error indication which I'd like to avoid: A
   function fails or succeeds and in either case appropriate steps
   have to be taken; just propagating the error code down to the
   original caller in the hope to catch it there is IMHO a bad idea.

Why?  If a function is explicitly documented as returning an error,
it's the caller's responsibility to handle it.  The callee often
doesn't know the high level context to handle it in a useful fashion.

-- 
Robert Krawitz <rlk@xxxxxxxxxxxx>      http://www.tiac.net/users/rlk/

Tall Clubs International  --  http://www.tall.org/ or 1-888-IM-TALL-2
Member of the League for Programming Freedom -- mail lpf@xxxxxxxxxxxx
Project lead for Gimp Print/stp --  http://gimp-print.sourceforge.net

"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux