patch for symbol.

Jens Vollinga vollinga at thep.physik.uni-mainz.de
Mon Jan 5 23:19:40 CET 2004


Hi.

Thanks again for your last complex conjugation patch, Chris. It has
made its way into GiNaC almost unchanged ;-)

On Mon, Jan 05, 2004 at 05:59:44PM +0000, Chris Dams wrote:
> 
> Here's a patch from GiNaC's RSI-prevention department. Reason for the
> patch: creating a real symbol is such a common operation that it should be
> as simple as possible.
> 

Now I am wondering, whether a new GiNaC class realsymbol derived from
symbol would be the best solution? 

(realsymbol will be no registered GiNaC class, but simply inherits
from symbol, realsymbol is a friend of symbol, only ctors have to be
rewritten, therefore all type infos are the same, the domain parameter
is not needed anymore ...)

Then you could simply (still enough stress?) write
realsymbol x("x")
or
ex r = 3 * realsymbol("x");

It looks good to me, but maybe there are important concerns (speed,
style, ...) ?!?
-> rsync "main GiNaC developers"

In case that it is a not so good idea, the new patch you sent seems to 
be the best solution.

Bye,
Jens




More information about the GiNaC-devel mailing list