On 27 March 2012 20:19, Mark Proctor <mproctor(a)codehaus.org> wrote:
On 27/03/2012 18:39, Wolfgang Laun wrote:
I think you misunderstood the intent of the proposal. It's not that I
propose
a reusable CE element combination which might indeed be a query. I proposed
a parameterized sequence of lexical tokens, aka macro. I trust that you
know
C and the C preprocessor: I want a macro, not a function.
I completely agree. It's one of the reasons why I've not pushed
drools-templates more. Because we also have "dsl" which are just another
form of templating. I'd prefer both those ideas where condensed into a
proper macro language. But it will take a lot of thought.
There are some things you can't do without, and some design decisions:
- Original line numbers must be preserved for subsequent processors.
- There must be an option for preserving the expansion text.
- Macro-time statements (conditional expansion) is powerful but more
difficult (to implement & to use).
- Recursion is most likely an overkill; handle "recursive calls" as in
the C preprocessor.
- Think about token concatenation, as in the C preprocessor.
- Think about stringification, as in the C preprocessor.
- Think about variable argument lists, parenthesized arguments,...
We might experiment with C's preprocessor, perhaps even m4, and see how it
goes...
-W
Mark
-W
On 27 March 2012 19:07, Mark Proctor <mproctor(a)codehaus.org> wrote:
> query can somewhat help for re-usable elements, as per "Add CE
> templates". You can wrap elements in a query and use that inside a
> rule, remember our queries are reactive if you leave off the ?.
>
> Mark
>
> On 27/03/2012 10:02, Wolfgang Laun wrote:
> > I've collected a few things I've been moaning about... They are
> > intended to make DRL programming more convenient, given the current
> > set of the Engine's capabilities, i.e., enhance Drools' usability!
> >
> > AFAIK, none of these proposals would break backward compatibility.
> >
> > Cheers
> > Wolfgang
> >
> >
> > On 27/03/2012, Mark Proctor<mproctor(a)codehaus.org> wrote:
> >> I've put up a wiki page to collect thoughts on ideas that would involve
> >> breaking backwards compatability in Drools. It's aimed to produce ideas
> >> for Drools 6.0.
> >>
> >> No suggestion is too silly, think of it as a brainstorming area for
> >> alternative syntaxes and behaviours to what we have now, so knock
> >> yourself out.
> >>
https://community.jboss.org/wiki/BreakingChangesSuggestions
> >>
> >> Mark
> >> _______________________________________________
> >> rules-dev mailing list
> >> rules-dev(a)lists.jboss.org
> >>
https://lists.jboss.org/mailman/listinfo/rules-dev
> >>
> > _______________________________________________
> > rules-dev mailing list
> > rules-dev(a)lists.jboss.org
> >
https://lists.jboss.org/mailman/listinfo/rules-dev
>
> _______________________________________________
> rules-dev mailing list
> rules-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-dev
>
_______________________________________________
rules-dev mailing
listrules-dev@lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-dev
_______________________________________________
rules-dev mailing list
rules-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev