These are chat archives for symengine/symengine

14th
Apr 2015
Isuru Fernando
@isuruf
Apr 14 2015 13:30
@certik, I started writing a printer class, and for it to be extensible and easy as possible to write a new printer, I used the visitor pattern and CRTP. https://github.com/isuruf/csympy/tree/printer
This might be a good idea to replace the visitor mechanism we've got where we have to define methods for all leaf classes. This way for example, we can define a method for a Sin and a TrigFunction and when a Sin is given Sin is called, for all other TrigFunctions method for TrigFunction is called.
I tried it with the EvalDoubleVisitor and there is no slowdown that I could see