This topic was split off (Split Topic) from Module property exported_operators/1 fails instead of returning empty list
This is going a bit off topic (or more to a specific part of the topic) but adding some thoughts/questions regarding when a result should be just success/fail or success/fail with a value.
Granted both you have more experience and skill with Prolog than me, but sitting on the side lines doesn’t advance ones skill.
My thoughts for the last several months on this are that if the code is deterministic and can return a value if successful, then when it fails it should also return a value, e.g
If the code is non-deterministic, then if it fails it should not return a value, only failure.
Just my thoughts, feel free to ignore or disagree.