Okay, I generally stay moot on these topics, because I have not been using Drools much lately, but I am very pleased with the direction that Drools has been taking under your guidance.
So, I don't care if a person cannot adjust to the declarative nature of a rules engine. People who are asking for "else" should not be using a declarative environment. Period. If I have a rule that says: If A => B then do 'something' (where 'something' is the consequence that is executed when the test is true) Then I can have another rule that says: If A < B then do 'something else' (and 'something else' is the consequence when this test is true) These two rules combine to model if-then-else. If we stick "else" into the rule construct then people are going to forever avoid leveraging the true power of the rules engine. By the way... Blaze Advisor has full support for all of that procedural stuff and it makes for unwieldy implementations all of the time. If you give a developer the opportunity to do things the lazy way, my opinion is that most developers will do just that! Please keep Drools pure. 'nuff said! - Dave -----Original Message----- From: Mark Proctor [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 11, 2006 7:47 AM To: [email protected] Subject: Re: [drools-user] How to express conditional logic via DRL - ? Unfortunately I'm finding that many people just cannot adjust to the declarative and coupletely decoupled nature of a rule engine. The end result is that Drools is used as a script execution framework. Felipe Piccolini wrote: > Mark, > > I could vote on this, I would vote no to the 'else'. The declarative > thing about rule engines is that: no procedural code. So if you > wanna do an 'else' condition you should re-think your rule and chack > if its well writen. Of course this is just MHO. > > :) > > Tuesday, April 11, 2006, 6:09:22 AM, you wrote: > > >> I thought about adding 'else' but I couldn't decide on the best way >> to implement it, as there are several possabilities. Also 'else' is >> not considered declarative, so its a kinda of code smell. I'll llook >> into this again in 3.1 >> > > >> Mark >> Geoffrey Wiseman wrote: >> >>> On 4/10/06, Dmitry Goldenberg <[EMAIL PROTECTED]> wrote: >>> >>> >>>> What is the timeframe for 3.1? Else/else if are very important to >>>> what we're trying to do. >>>> >>>> I can see how I can to the following with the method described by >>>> Geoffrey: >>>> >>>> if (A) then B else if (C) then D endif >>>> >>>> I also want to be able to do the following: >>>> >>>> if (A) then B else D endif >>>> >>>> I imagine that the rule would have to be written as a combo of >>>> >>>> if (A) then B endif >>>> if (!A) then D endif >>>> >>>> so that the conditions are complimentary... >>>> >>>> >>>> >>> Indeed, yes, that's how you'd handle it. >>> >>> If it does make it into 3.1, that's a good thing in terms of >>> supporting the way people think, talk, and work in other languages, >>> but fundamentally, the same capabilities are there now -- they just require more typing. >>> >>> - Geoffrey >>> -- >>> Geoffrey Wiseman >>> >>> >>> > > > > -------------------------- > Felipe Piccolini > [EMAIL PROTECTED] > > > >
