<br><br><div class="gmail_quote">On 18 August 2011 19:27, Mark Proctor <span dir="ltr">&lt;<a href="mailto:mproctor@codehaus.org">mproctor@codehaus.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><div class="im">
    On 18/08/2011 18:17, Wolfgang Laun wrote:
    <blockquote type="cite">On 18 August 2011 18:38, Mark Proctor <span dir="ltr">&lt;<a href="mailto:mproctor@codehaus.org" target="_blank">mproctor@codehaus.org</a>&gt;</span>
      wrote:<br>
      <div class="gmail_quote">
        <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
          We are looking to tighten up accumulate, using a new keyword
          to<br>
          differentiate. It will use ; for separation, to follow a
          similar form to<br>
          a &#39;for&#39; loop.<br>
          <br>
          acc( CE*;<br>
          &lt;func&gt;*;<br>
          &lt;guard&gt;? )<br>
          <br>
          so something like:<br>
          <br>
          acc( $o : Order();<br>
                  $min : min( $o.value ),<br>
                  $max : max($o.value);<br>
                  $min &gt; 100 &amp;&amp; $max &lt; 100 )<br>
        </blockquote>
        <div><br>
          Given that I can do this today using an eval after the
          accumulate CE: What&#39;s the big gain, as compared to the
          nuisance of yet another CE, with the need to document (which,
          traditionally, isn&#39;t done so eagerly) and teach and learn and
          getting it free of bugs?<br>
        </div>
      </div>
    </blockquote></div>
    I find the above looks cleaner and easier to read, the more we can
    reduce the need for &#39;eval&#39; the better. It is a common enough use
    case that I feel it is worth support.</div></blockquote><div><br>Well, a condition that&#39;s never true isn&#39;t a good use case. Even after repairing it, the example does not tell you <i>where </i>the min and max, respectively, are. Apart from determining the exact value of mininimum and maximum (which could easily be added, together with locating the containing Order!)<br>
   not Order( value &lt;= 100 )<br>   not Order( value &gt;= 200 )<br>is more descriptive that the rather procedural &quot;for&quot; hidden in the proposed &quot;acc&quot;.<br><br>Perhaps there are better use case; this one does not convince me.<br>
<br>-W<br><br> <br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div bgcolor="#FFFFFF" text="#000000"> Acc is used a lot for CEP use
    cases and we need a syntax that can compete succinctly with
    alternative approaches - if we look like a dog dinner, we&#39;ll lose
    out to alternative CEP syntaxes. The separation of the segments
    using &quot;;&quot; gives a clearer distinction too, and it&#39;s &#39;for&#39; loop like
    nature should more natural to people new to the engine.<br><font color="#888888">
    <br>
    Mark</font><div class="im"><br>
    <blockquote type="cite">
      <div class="gmail_quote">
        <div>
          <br>
          -W<br>
           </div>
        <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
          <br>
          I have wondered if we could use pipes on our functions, to be
          able to<br>
          pass the results of one function into another - just not sure
          how that<br>
          will work or look yet.<br>
          func(...) in func(...)<br>
          func(...) | func(...)<br>
          <br>
          Mark<br>
          <br>
          _______________________________________________<br>
          rules-dev mailing list<br>
          <a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>
          <a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
        </blockquote>
      </div>
      <br>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
rules-dev mailing list
<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
</pre>
    </blockquote>
    <br>
  </div></div>

<br>_______________________________________________<br>
rules-dev mailing list<br>
<a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
<br></blockquote></div><br>