[Ecls-list] Embedding question

Juan Jose Garcia-Ripoll jjgarcia at users.sourceforge.net
Thu May 22 15:15:49 UTC 2008


On Thu, May 22, 2008 at 5:08 PM, KONOVALOV, Vadim (Vadim)** CTR **
<vkonovalov at alcatel-lucent.com> wrote:
> thanks for the link,
> Do I understand correctly that si_safe_eval should always be used when embedding ECL?
> i.e. cl_eval is possible bot not useful and should always be avoided for the reasons of potential breakage?

Yes and no. Basically, most people do not know and do not need to know
how to set up an error handler in C using ECL. So for most people
si_safe_eval() is the best option.

For more sophisticated requirements on error handling, nonlocal exits,
etc, you can write your own evaluator in lisp and invoke it using
either si_safe_eval() or cl_eval(). But remember that in the last case
you have to capture all nonlocal exits using unwind-protect,
handler-case, restarts, etc.

So cl_eval() can be useful, but si_safe_eval() is good for most purposes.

Juanjo

-- 
Facultad de Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 28040 (Spain)
http://juanjose.garciaripoll.googlepages.com




More information about the ecl-devel mailing list