[rules-dev] Functional programming in Drools: Brackets and Commas

Wolfgang Laun wolfgang.laun at gmail.com
Thu Oct 20 07:57:56 EDT 2011


On 20 October 2011 13:43, Toni Rikkola <toni.rikkola at gmail.com> wrote:

>
> And I don't know the answer to the next question, just asking because I
> have seen it work in other languages :-)
>
Certainly not with overloading.


> Not a must have, in other cases using parentheses is cleaner.
>

Eliminating all that's redundant has the downside that recovery from syntax
errors is difficult, if not impossible. Typically, within each NT, you have
a set of delimiters where you can assume that some higher level NT
terminates (a closing bracket/brace/parenthesis) or enters another
subordinate NT (comma, semicolon).

Also, don't forget the help you get in an editor when you close a b/b/p by
highlighting the opening counterpart.

Architects have a name for this sort of thing, the German term is
"Orientierungsqualität", which could be translated as "guidance quality".
Its lack in modern quarters is frequently appalling ;-)

-W


> Toni
>
> On Oct 20, 2011, at 2:25 PM, Wolfgang Laun wrote:
>
>
>
> On 20 October 2011 13:15, Toni Rikkola <toni.rikkola at gmail.com> wrote:
>
>> I'm just asking if we can drop the brackets and maybe even the commas to
>> get a cleaner look.
>>
>>
> Do you mean parentheses, i.e. ()?
>
> How will a parser be able to determine the end of a parameterlist if there
> is one call inside the other?
>
> -W
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20111020/918abb3d/attachment.html 


More information about the rules-dev mailing list