This is the mail archive of the gsl-discuss@sourceware.org mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GSL 2.0 roadmap (one man's view)


At Thu, 27 Aug 2009 17:15:39 -0600,
Gerard Jungman wrote:
>    GSL implements a very rudimentary type of error-handling, which
>    is quite appropriate for small projects. The "register handler,
>    fail-by-default" model works for a small library with a "low
>    stack depth" usage model. By this, I mean that library functions
>    are called by clients, but not by other library functions; in
>    such a case, it is easy for the client to interpret the errors.
>    But GSL does not conform to this "low stack depth" usage model,
>    and the fail-by-default model can be confusing for clients, when
>    the failure occurs at depths that they cannot control.

The issue here is threading -- otherwise we could use a global
variable to control the behaviour.  

Either we have to 

- pass an extra argument to all(?) functions for error control (seems
  a large impact for a relatively small problem)

- provide separate _impl non-aborting versions for functions called
  internally, similar to the special functions (simplest option).

- use thread local storage for a global error control variable (not
  100% portable).

-- 
Brian Gough


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]