I was reflecting on Rich Hickey's talk, Simple Made Easy, when I got to the "What's in your Toolkit?" slide. There is a list of contrasts between complexity and simplicity, this one piqued my interest:
Complexity: Conditionals, Simplicity: Rules
Does anyone have any insight into what sorts of things Rich was proposing here?
We can also make conditional clauses without if. Study the examples given below. If I had known his real motive, I wouldn't have supported him.
In zero conditional sentences, you can replace "if" with "when", because both express general truths. The meaning will be unchanged.
I guess he is reffering on Conditionals as boolean expressions in programming languages. If you have many conditional Statements like loops and switches it will get complex very fast. The simpler way is to define Rules. Rules are in a more natural language, you can handle them in a more abstract way to describe your conditions.
Look at the Windows access Management where you can assign rules to users about the rights they have. Like changing the desktop wallpaper. The rules are easy to understand and it's an simple boolean decisions if an rule is applied or not. But if your extract all the conditionals behind the rules it will get very complex. Because you have to care about each and every thing that could affect the wallpaper in this case.
In the end both are methods to describe a Condition, but the one is simpler that the other.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With