Comment by swat535
But if that’s all you have, then how does your system do anything ? You ultimately need to be able to decide and then act based in that decision somewhere..
But if that’s all you have, then how does your system do anything ? You ultimately need to be able to decide and then act based in that decision somewhere..
I think the parent's argument is that wherever in your framework you're calling `doth_match` and then `doeth_thou`, you have a single function that's both deciding and acting. There has to be a function in your program that's responsible for doing both.
A function that asks a question with one function call and calls another based on the answer isn’t doing any work or asking any questions. It’s just glue code. And as long as it stays just glue code, that’s barely any of your code.
Asking for absolutes is something journeymen developers need to grow out of.
The principle of the excluded middle applies to Boolean logic and bits of set theory and belongs basically nowhere else in software development. But it’s a one trick pony that many like to ride into the ground.
One possibility is a file.py that is called by your framework. The interface could be something like
The framework loops and checks the first function; if true, then execute the second function. And then break or continue for other rule files (or objects).There could be multiple files rule1.py, rule2.py, etc that check and do different things.