that would be a major breakage though - as a lot of people don't use that. Would want to take some time enforcing it.
cool.. I think that it's a great idea to enforce it..giving people to much choices to do the same always complicates things.--On Thu, Sep 23, 2010 at 8:46 PM, Mark Proctor <mproctor@codehaus.org> wrote:
yes, ? wasn't easy due to java and data munging would get messy as we map between things.
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
Person( age : age )
Person( age == age )
The above looks a little confusing compared to:
Person( $age : age )
Person( age == $age )
Davide wants to enforce the $ prefix so that parsing can be easier.
Mark
On 24/09/2010 00:31, Michael Neale wrote:The $name: Pattern thing I am convinced is to do with Mark's prior history of being abused by perl ;)
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.
So here we are ;)_______________________________________________ rules-dev mailing list rules-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-dev
On Fri, Sep 24, 2010 at 12:29 AM, Greg Barton <greg_barton@yahoo.com> wrote:
Yes, and I don't think we want to take readability cues from Perl. :)
GreGOn 23 September 2010 09:31, Bruno Unna <bruno.unna@gmail.com> wrote:
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 (http://bit.ly/dgw4GT):
Low precedence "and", "or", "xor" were introduced to permit "Perl poetry", or, more seriously, to
permit control flow using a logical expression, especially after function calls without parentheses.
see Naples or die; # same as: see(Napes) || die(); but not: see(Naples || die() );
No way this makes any sense in Drools.
-W
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.
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.
Regards.
_______________________________________________
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
--
Michael D Neale
home: www.michaelneale.net
blog: michaelneale.blogspot.com
_______________________________________________
rules-dev mailing list
rules-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
- CTO @ http://www.plugtree.com
- MyJourney @ http://salaboy.wordpress.com
- Co-Founder @ http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -
_______________________________________________
rules-dev mailing list
rules-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev