We want to be able to quickly compare types in LPython, see lcompilers/lpython#2351. The fastest way that we were able to find is to just compare the TYPE_ID integers directly. I think this is the best solution, the only caveat is that if SymEngine changes the order, then older LPython with newer SymEngine will break.
One solution is that if we need to change the order, we'll make a major release. Otherwise in minor or patch releases we will not change this order.
We want to be able to quickly compare types in LPython, see lcompilers/lpython#2351. The fastest way that we were able to find is to just compare the TYPE_ID integers directly. I think this is the best solution, the only caveat is that if SymEngine changes the order, then older LPython with newer SymEngine will break.
One solution is that if we need to change the order, we'll make a major release. Otherwise in minor or patch releases we will not change this order.