GiNaC/doc/tutorial ginac.texi

Pearu Peterson pearu at cens.ioc.ee
Tue Apr 10 07:55:47 CEST 2001



On Tue, 10 Apr 2001, Richard B. Kreckel wrote:

> <preach>
> Hmm, you know that you are abusing the language, don't you?  As a next step
> step you might #define private public before #include'ing <ginac/ginac.h>.

:-)

> That's just scary!  Better stick to the interfaces provided by the library.
> </preach>

Agreed. I would love to stick to the libriary interface! I am sure that 
for an ordinary GiNaC  application the interface is quite adequate. 
But it is not for a wrapper to another language such as Python.
The reason is that I want such a wrapper to reflect GiNaC's
structure to Python as close as possible. And therefore these tricks were
needed.

You can learn more about what was needed for a Python interface to GiNaC
in the following three files that as a part of pyGiNaC implement
Python str and repr functions for GiNaC objects:

http://cens.ioc.ee/cgi-bin/cvsweb/python/pyGiNaC/wrappers/wrap_classes.cpp?rev=1.1&content-type=text/x-cvsweb-markup

http://cens.ioc.ee/cgi-bin/cvsweb/python/pyGiNaC/wrappers/python_repr.cpp?rev=1.2&content-type=text/x-cvsweb-markup

http://cens.ioc.ee/cgi-bin/cvsweb/python/pyGiNaC/wrappers/python_str.cpp?rev=1.2&content-type=text/x-cvsweb-markup

Regards,
	Pearu




More information about the GiNaC-devel mailing list