On Thu, Jan 25, 2024 at 03:46:00PM +0100, Ralf Hemmecke wrote:
> Hi Qian,
> 
> just a side remark...
> 
> On 1/25/24 11:36, Qian Yun wrote:
> 
> > +      nu : Union(N, "failed") := trappedSpadEval(possibleOrder(d))$Lisp
> 
> Oh, trappedSpadEval $ Lisp looks like a useful function.
> Sounds like a "try [CODE] catch ..." construction.
> 
> What exactly can it do?
> 
> Hmmmm... unfortunately it is another "foo $ Lisp" appearing in code.
> Maybe that function can be put into a package in order to reduce the "Lisp"
> occurrences in ordinary SPAD code.

'trappedSpadEval' is a macro, this makes a difference in use.
Wrapping it in a function would defeat the purpose: it is
suppossed to catch errors in evalutation of its argument.
Functions get evaluated arguments, so any possible error
in evalutation happens before function can do anything about it.

Currently we can not import/export Spad macros and using Spad macro
as a wrapper would not help with main drawback, that is lack
of typechecking.

One could do version which takes a function as an argument, but
such version is less convenient to use.

-- 
                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/ZbReQIUJZQk70cxg%40fricas.org.

Reply via email to