PROPOSAL: Dynamic creation of functions

Richard B. Kreckel kreckel at thep.physik.uni-mainz.de
Mon Aug 20 20:22:23 CEST 2001


On Mon, 20 Aug 2001, Richard B. Kreckel wrote:
> On Mon, 20 Aug 2001, Pearu Peterson wrote:
> > Meanwhile I implemented these hooks, and it works perfectly.
> > Please find the patch attached to this message.
> 
> Thanks a lot for your patch, I am currently investigating it.  This won't
> be finished today, hopefully tomorrow.  Just one question: You know that
> this issue has been discussed already with no final consensus?  The last
> rant is archived at <http://www.ginac.de/lists/ginac-devel/msg00259.html>.  
> (I don't see clear yet.  This email is just to make sure we don't miss any
> opportunity.)

Okay, I've looked at Peru's patch now.  It is indeed quite trivial.  Let
me restate it: where we have foofunction_eval(const ex &x, const ex &y)
with a fixed number of arguments he proposes to add an alternative where
there is foofunction_eval(exvector) directly, i.e. not to do the
translating effort from seq[0] to x and seq[1] to y.  His patch simply
adds additional support for this into function.pl along the old named
arguments.  Interstingly, this seems to solve a bunch of problems of
scripting-interface maintainers.

Alex (and Christian): May I ask you for a braindump of yours as to why we
haven't done this all the time?  Is it just a matter of being able to
access `x' and `y' inside the implementations of foofunction_eval() or
were there any other less trivial considerations?  (This way all the
function.{h,cpp} being generated from function.pl would be unnecessary.
Not that I want to throw it out, though...)

Hasta luego
         -richy.
-- 
Richard Kreckel
<Richard.Kreckel at Uni-Mainz.DE>
<http://wwwthep.physik.uni-mainz.de/~kreckel/>





More information about the GiNaC-devel mailing list