<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.5921" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=586510309-24092010><FONT face=Arial
color=#0000ff size=2>Java allows confusing constructs too but they are left for
the developer to handle rather than imposed by the language
specification:-</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=586510309-24092010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=586510309-24092010><FONT face="Courier New"
color=#0000ff size=2>class Smurf {</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=586510309-24092010><FONT face="Courier New"
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=586510309-24092010><FONT face="Courier New"
color=#0000ff size=2> int a;</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=586510309-24092010><FONT face="Courier New"
color=#0000ff size=2> int b;</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=586510309-24092010><FONT face="Courier New"
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=586510309-24092010><FONT face="Courier New"
color=#0000ff size=2> Smurf(int a, int b)
{</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=586510309-24092010><FONT face="Courier New"
color=#0000ff size=2> a =
a;</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=586510309-24092010><FONT face="Courier New"
color=#0000ff size=2> b =
b;</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=586510309-24092010><FONT face="Courier New"
color=#0000ff size=2> }</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=586510309-24092010><FONT face="Courier New"
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=586510309-24092010><FONT face="Courier New"
color=#0000ff size=2>}</FONT></SPAN></DIV><BR>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> rules-dev-bounces@lists.jboss.org
[mailto:rules-dev-bounces@lists.jboss.org] <B>On Behalf Of </B>Mark
Proctor<BR><B>Sent:</B> 24 September 2010 00:46<BR><B>To:</B>
rules-dev@lists.jboss.org<BR><B>Subject:</B> Re: [rules-dev] Drools syntax
diagrams - redrawn<BR></FONT><BR></DIV>
<DIV></DIV>yes, ? wasn't easy due to java and data munging would get messy as
we map between things.<BR><BR>So we just left it as any valid java identifier,
but using the $ prefix as a coding convention make it easier to differentiate
fieldnames and bindings<BR>Person( age : age )<BR>Person( age == age
)<BR> <BR>The above looks a little confusing compared to:<BR>Person( $age
: age )<BR>Person( age == $age )<BR><BR>Davide wants to enforce the $ prefix
so that parsing can be easier.<BR><BR>Mark<BR>On 24/09/2010 00:31, Michael
Neale wrote:
<BLOCKQUOTE
cite=mid:AANLkTimDnOjW_ozVqOz=W-pTheT=ftq3Nv1AU-wh+4rb@mail.gmail.com
type="cite">The $name: Pattern thing I am convinced is to do with Mark's
prior history of being abused by perl ;)
<DIV><BR></DIV>
<DIV>But the real reason is we wanted to use ?name: Pattern() - using "?"
like the clips lineage of languages - but IIRC even ilog allows that. We
wanted our labels to be compatible with java source code - where $variable
is a valid name (although no one actually uses it) and ?name is
not. </DIV>
<DIV><BR>So here we are ;)</DIV>
<DIV><BR><BR>
<DIV class=gmail_quote>On Fri, Sep 24, 2010 at 12:29 AM, Greg Barton <SPAN
dir=ltr><<A href="mailto:greg_barton@yahoo.com"
moz-do-not-send="true">greg_barton@yahoo.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV bgcolor="#FFFFFF">
<DIV>Yes, and I don't think we want to take readability cues from Perl.
:)<BR><FONT color=#888888><BR>GreG</FONT></DIV>
<DIV>
<DIV class=h5>
<DIV><BR>On Sep 23, 2010, at 3:03, Wolfgang Laun <<A
href="mailto:wolfgang.laun@gmail.com" target=_blank
moz-do-not-send="true">wolfgang.laun@gmail.com</A>>
wrote:<BR><BR></DIV>
<BLOCKQUOTE type="cite">
<DIV>On 23 September 2010 09:31, Bruno Unna <SPAN dir=ltr><<A
href="mailto:bruno.unna@gmail.com" target=_blank
moz-do-not-send="true">bruno.unna@gmail.com</A>></SPAN> wrote:<BR>
<DIV class=gmail_quote>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>FWIW: in Perl, there are both operators as well (|| and 'or').
However, they are *not* exactly the same. Although they can be used in
any context to render a boolean expression, their priority makes the
difference. Taken from official documentation (<A
href="http://bit.ly/dgw4GT" target=_blank
moz-do-not-send="true">http://bit.ly/dgw4GT</A>):
<DIV><BR></DIV></DIV></BLOCKQUOTE>
<DIV><BR>Low precedence "and", "or", "xor" were introduced to permit
"Perl poetry", or, more seriously, to<BR>permit control flow using a
logical expression, especially after function calls without parentheses.
<BR> see Naples or die; # same as: see(Napes) ||
die(); but not: see(Naples || die() );<BR><BR>No way this makes any
sense in Drools.<BR><BR>-W<BR><BR></DIV>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV>
<BLOCKQUOTE type="cite">Binary "or" returns the logical disjunction
of the two surrounding expressions. It's equivalent to || except for
the very low precedence. This makes it useful for control
flow.</BLOCKQUOTE></DIV>
<DIV><BR></DIV>
<DIV>Nonetheless, it must be taken into account that the distinction
makes sense for a Perl programmer. For a rules-writing guy (or girl)
perhaps the distinction is extremely obscure.</DIV>
<DIV><BR></DIV>
<DIV>Regards.<BR>
<DIV><BR></DIV><BR></DIV></DIV></BLOCKQUOTE></DIV><BR></DIV></BLOCKQUOTE></DIV></DIV>
<DIV class=im>
<BLOCKQUOTE type="cite">
<DIV><SPAN>_______________________________________________</SPAN><BR><SPAN>rules-dev
mailing list</SPAN><BR><SPAN><A href="mailto:rules-dev@lists.jboss.org"
target=_blank
moz-do-not-send="true">rules-dev@lists.jboss.org</A></SPAN><BR><SPAN><A
href="https://lists.jboss.org/mailman/listinfo/rules-dev" target=_blank
moz-do-not-send="true">https://lists.jboss.org/mailman/listinfo/rules-dev</A></SPAN><BR></DIV></BLOCKQUOTE><BR></DIV></DIV><BR>_______________________________________________<BR>rules-dev
mailing list<BR><A href="mailto:rules-dev@lists.jboss.org"
moz-do-not-send="true">rules-dev@lists.jboss.org</A><BR><A
href="https://lists.jboss.org/mailman/listinfo/rules-dev" target=_blank
moz-do-not-send="true">https://lists.jboss.org/mailman/listinfo/rules-dev</A><BR><BR></BLOCKQUOTE></DIV><BR><BR
clear=all><BR>-- <BR>Michael D Neale<BR>home: <A
href="http://www.michaelneale.net"
moz-do-not-send="true">www.michaelneale.net</A><BR>blog: <A
href="http://michaelneale.blogspot.com"
moz-do-not-send="true">michaelneale.blogspot.com</A><BR></DIV><PRE wrap=""><FIELDSET class=mimeAttachmentHeader></FIELDSET>
_______________________________________________
rules-dev mailing list
<A class=moz-txt-link-abbreviated href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</A>
<A class=moz-txt-link-freetext href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</A>
</PRE></BLOCKQUOTE><BR></BLOCKQUOTE></BODY></HTML>