Closed florian-rabe closed 6 years ago
I do not think "awkwardness" is enough of a reason to rewrite a code that works and does exactly what it is asked for. Don't forget that the scope is local to the module, so I really don't see how wrapping into a class would improve things.
I agree with @florian-rabe here, in that there is global state here where there should be none.
In particular, it is not possible to have two different conversions for the same OpenMath object registered. This essentially makes it impossible to use theconvert
module as a dependency without having to worry about other modules using the same symbols already.
Made PR #12 in an attempt to fix this issue.
The convert methods maintains global state, which is awkward.
The code should be wrapped into a class that encapsulates the state.