The problem with 'else' is that it's not declarative and introduces large ambiguity in to your rule - which may have unwanted side effects over time, that you did not envision. Rules should be precise with as little ambiguity as possibe - they should describe what they do, not have a catch all for what they do not do. It's far better to really think about your rules and decide what the exact scenario you are trying to capture with the 'else'. In the long run your rule's will make more sense for people who come back to reading them in the future and thus you will have a system that is easier to maintain and less susceptable to bugs - which is one of more compelling reasons for using a Rule Engine.

That does not mean I will not introduce 'else' in future versions of Drools, I still need a lot more time to evaluate it and possible implementations. But if it is introdoced it will still be governed by the above caveat.

Mark

Reply via email to