Open vsbogd opened 6 months ago
When/if we move to having grounded atoms in Rust with automatic conversion to Rust, we may want to revisit this issue.
When/if we move to having grounded atoms in Rust with automatic conversion to Rust, we may want to revisit this issue.
I don't think the result will be different. If two atoms are Python grounded atoms and checked for equality then Python equality function is called.
I think we can override Python equality for grounded atoms to check type equality before checking value equality. Or specifically check this case if two values are considered equal.
My plan was to try removing Python grounded functions, but yes, I'm not sure if we can avoid removing equality. If not, it poses an interesting question if we can call Rust equality on Rust objects and Python equality on Python objects. It seems not that straightforward as I hoped.
Following example returns
[ok]
while it is expected to return[(foo True)]
:The reason is that in Python
1
==True
: