On 18 August 2011 18:38, Mark Proctor <mproctor@codehaus.org> wrote:I find the above looks cleaner and easier to read, the more we can reduce the need for 'eval' the better. It is a common enough use case that I feel it is worth support. Acc is used a lot for CEP use cases and we need a syntax that can compete succinctly with alternative approaches - if we look like a dog dinner, we'll lose out to alternative CEP syntaxes. The separation of the segments using ";" gives a clearer distinction too, and it's 'for' loop like nature should more natural to people new to the engine.
We are looking to tighten up accumulate, using a new keyword to
differentiate. It will use ; for separation, to follow a similar form to
a 'for' loop.
acc( CE*;
<func>*;
<guard>? )
so something like:
acc( $o : Order();
$min : min( $o.value ),
$max : max($o.value);
$min > 100 && $max < 100 )
Given that I can do this today using an eval after the accumulate CE: What's the big gain, as compared to the nuisance of yet another CE, with the need to document (which, traditionally, isn't done so eagerly) and teach and learn and getting it free of bugs?
-W
I have wondered if we could use pipes on our functions, to be able to
pass the results of one function into another - just not sure how that
will work or look yet.
func(...) in func(...)
func(...) | func(...)
Mark
_______________________________________________
rules-dev mailing list
rules-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
_______________________________________________ rules-dev mailing list rules-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-dev