<br>    I like features that add language extensibility and I would be happy to consider that into the design of the language if people can provide us with a good proposal. In this case, the (upcoming?) support for units in MVEL would be an implementation of this extension point.<br>
<br>    The main problem I see is how to identify which plugin would be responsible for interpreting a given value. For instance:<br><br>Box( height &lt; “3 meters” )<br><br>    How will the engine know that &quot;3 meters&quot; should be parsed by plugin A instead of plugin B? Or even how should the engine know &quot;3 meters&quot; isn&#39;t just a String?<br>
<br>    I think if we answer this question, everything else may be fixed to work. As you may see, this is as much a language design/parsing question as an internal issue.<br><br>    []s<br>    Edson<br><br>PS: this will not make the cut for 5.0, but we may be able to do something right after, for 5.1.<br>
<br>    <br><br><div class="gmail_quote">2009/3/8 Mark Proctor <span dir="ltr">&lt;<a href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">David Boaz wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
In my application we use few value objects. For example, Dates, Quantities<br>
and Durations. These objects are immutable and have some behavior. For<br>
example, comparing two quantities may involve quantity-conversion<br>
computations (“2 foot” &lt; “3 meter”).<br>
<br>
In drools documentation I found an interesting example (section<br>
6.5.2.1.1.3.2. Literal Restrictions, example 6.20):<br>
Cheese( bestBefore &lt; “27-Oct-2007”)<br>
How Does the parser knows to create a Date object from that String? Does<br>
Date has a ‘specialized’ behavior in drools? Is it possible to ‘plugin’<br>
similar behavior for my value classes? How?<br>
<br>
I’d like to achieve the following functionality:<br>
Person(height &lt; “2-meter”)<br>
  <br>
</blockquote></div>
We have built in type co-ercion, unfortunately this is not pluggable and fixed around numbers, strings and dates. We are looking to have built in unit support at some time, but no specific dates for this, we are waiting for the feature to make it&#39;s way into MVEL, probably around Q3 I guess, you&#39;ll have to ask the MVEL author.<br>

<br>
Mark<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks, David<br>
  <br>
</blockquote><div><div></div><div class="h5">
<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>