Closed JP-Ellis closed 5 years ago
I like the idea, but the implementation with Switch
is IMHO not optimal. I think that it is more efficient
to extract the rules first and then combine them with the rules automatically created out of symbols. And of course one should always add a few unit tests when implementing new features. That has already saved me from introducing serious bugs multiple times.
All good. Switch
I thought was an easy implementation but I don't really know how efficient it is (nor do I know just how important efficiency matters in this particular step). As for the unit tests, I completely agree and thanks for adding them (I didn't realize you had unit tests!).
Well, since there is no public CI service that offers continuous integration for Mathematica, I usually just run the unit tests on my own computer. But yes, in general I'm a huge proponent of test driven development. Apart from the unit tests
Tests/unittests.sh math
we also have integration tests
Tests/inttests.sh math
and a possibility to run all the included examples
Tests/examples.sh math
Anyway, I hope I didn't discourage you or so. If you have more ideas or suggestions, feel free to create issues, use the mailing list or well write new pull requests.
Prior to this,
Conjugate
could only handle a list of elements which must match exactly for them to be complex conjugated. This now allows for custom rules to be allowed.For example, the following is supported
which will leave the three rules unchanged, and implicitly understand that
Lambda -> Conjugate[Lambda]
.