<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 19/08/2011 05:53, Wolfgang Laun wrote:
    <blockquote
cite="mid:CANaj1Ld=pJ7e5iDLLq4P0PUPN=1hN-pv7F8Cn+i9VRaWSwABpA@mail.gmail.com"
      type="cite"><br>
      <br>
      <div class="gmail_quote">On 18 August 2011 19:27, Mark Proctor <span
          dir="ltr">&lt;<a moz-do-not-send="true"
            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 moz-do-not-send="true"
                    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 'for' loop.<br>
                    <br>
                    acc( CE*;<br>
                    &lt;func&gt;*;<br>
                    &lt;guard&gt;? )<br>
                    <br>
                    so something like:<br>
                    <br>
                    acc( $o : Order();<br>
                    &nbsp; &nbsp; &nbsp; &nbsp; $min : min( $o.value ),<br>
                    &nbsp; &nbsp; &nbsp; &nbsp; $max : max($o.value);<br>
                    &nbsp; &nbsp; &nbsp; &nbsp; $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's the big gain, as compared
                    to the nuisance of yet another CE, with the need to
                    document (which, traditionally, isn'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 'eval' the better. It is a common
            enough use case that I feel it is worth support.</div>
        </blockquote>
        <div><br>
          Well, a condition that's never true isn'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>
          &nbsp;&nbsp; not Order( value &lt;= 100 )<br>
          &nbsp;&nbsp; not Order( value &gt;= 200 )<br>
          is more descriptive that the rather procedural "for" hidden in
          the proposed "acc".<br>
        </div>
      </div>
    </blockquote>
    I wasn't showing it as a use case, I was showing it as illustrative
    of the syntax. I could have just done<br>
    acc( $o : MyClass();<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $f1 : fun1( $o ),<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $f2 : fun2( $o );<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; somBooleanFunc( $f1, $f2 ) )<br>
    <br>
    Mark<br>
    <blockquote
cite="mid:CANaj1Ld=pJ7e5iDLLq4P0PUPN=1hN-pv7F8Cn+i9VRaWSwABpA@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <div><br>
          Perhaps there are better use case; this one does not convince
          me.<br>
          <br>
          -W<br>
          <br>
          &nbsp;<br>
          <br>
          &nbsp;</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'll lose out to alternative CEP syntaxes. The
            separation of the segments using ";" gives a clearer
            distinction too, and it's 'for' 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>
                    &nbsp;</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 moz-do-not-send="true"
                      href="mailto:rules-dev@lists.jboss.org"
                      target="_blank">rules-dev@lists.jboss.org</a><br>
                    <a moz-do-not-send="true"
                      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 moz-do-not-send="true" href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a>
<a moz-do-not-send="true" 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 moz-do-not-send="true"
            href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br>
          <a moz-do-not-send="true"
            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>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
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>
  </body>
</html>