7

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?

1
  • I guess I know the general answer, rules engines, and that this starts to tread on the lands of things like logic programming, but I was wondering if someone can speak to the how, or give motivating examples of ways that we can deal with domain logic declaratively. Thanks!
    – Chris
    Commented May 9, 2012 at 17:44

1 Answer 1

4
+100

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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.