@ge0ffrey,<br><br>*you* know &quot;looc&quot; is a typo, but &quot;loc&quot; could equally be an unused bound variable and &quot;looc&quot; an unused output value.<br><br>I find it difficult to see there is sufficient &quot;context&quot; to give a suitable error message - other than perhaps warning of unused bindings.<br>

<br>@wolfgang,<br><br>Your proposition works for slotted parameters; whereas the &quot;;&quot; allowed for positional parameters too.<br><br>AFAIK the BC changes bring two discrete features: BC and positional parameters.<br>
<br>@all<br><br>I&#39;ve expressed my &quot;simpleton&quot; view on how, as a user, I would best understand its operation.<br><br>It isn&#39;t based upon science or a wealth of experience with a multitude of other programming languages; just a &quot;feeling&quot; of what I consider right.<br>

<br>Being just a &quot;feeling&quot; I am happy to watch this discussion evolve and learn from others&#39; experience.<br><br>With kind regards,<br><br>Mike<br><br><div class="gmail_quote">On 21 April 2011 07:50, Geoffrey De Smet <span dir="ltr">&lt;<a href="mailto:ge0ffrey.spam@gmail.com" target="_blank">ge0ffrey.spam@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

  
    
    
  
  <div text="#000000" bgcolor="#ffffff"><div>
    <blockquote type="cite">and instead have the tooling inject what
      ever is necessary as a visulation.</blockquote>
    </div><blockquote type="cite">&gt; Most questions we have to the user
      mailing list involve people writing DRL not using tooling.</blockquote>
    IntelliJ users and NetBeans users don&#39;t have any (up-to-date) DRL
    tooling.<br>
    Some Eclipse users I know don&#39;t install extra plugins such as the
    drools plugin out of fear of Eclipse instability.<br>
    The new Eclipse plugin wont do that visualization yet either?<br>
    <br>
    <br>
    I like Laun&#39;s and Manstis and mine proposal,<br>
    as long as there&#39;s something in the syntax that makes it clear
    whether that food is<br>
    - an input variable =&gt; constrains the rule, potentially
    decreasing the number of activations<br>
    - an output variable =&gt; frees the rule, potentially increasing
    the number of activations<br>
    <br>
    And a typo shouldn&#39;t change the behavior from one to the other, it
    should give a compilation error.<br>
    <div><code>rule</code>
      <code>typo2<br>
      </code><code>when</code></div>
    <div><code>    </code><code>Here( loc : location)<br>
      </code></div>
    <div><code>    </code><code>?</code><code>editableThings</code><code>(food, </code><code>looc</code><code>;)</code><code> // looc is a
        typo of loc</code></div>
    <div><div><code>then</code><br>
          System.out.println(&quot;Food &quot; + f + &quot; at location &quot; + loc);<br>
          // Output:<br>
          // Food crackers at location kitchen<br>
          // Food apple at location kitchen<br></div>
          // Food chocolate at location kitchen // BUG: that food is in
      the living room!<br>
          // Food chips at location kitchen // BUG: that food is in the
      living room!</div>
    <div><code>end<br>
        <br>
        <br>
      </code></div>
    <br>
    <br>
    Op 21-04-11 08:27, Wolfgang Laun schreef:
    <div><div></div><div><blockquote type="cite">Designing syntax well is not easy. With extensions,
      one should strive for as much<br>
      conformity with the existing language, while trying to follow
      general principles.<br>
      <br>
      One might have discussed (for instance) the use of field names for
      referencing<br>
      the query relations, taken from their parameter definition. And
      then one could write,<br>
      as usual:<br>
      <br>
          ?editableThings(food: thing, location == loc )<br>
      <br>
      or<br>
      <br>
          ?editableThings(food: thing, loc: location )<br>
      <br>
      And the in/out is clear to all who know a little legacy DRL.<br>
      <br>
      And the ugly semicolon evaporates.<br>
      <br>
      And the maintainability/readability disadvantage of &quot;positional&quot;
      is gone.<br>
      <br>
      Cheers<br>
      -W<br>
      <br>
      <br>
      On 20 April 2011 22:52, Michael Anstis &lt;<a href="mailto:michael.anstis@gmail.com" target="_blank">michael.anstis@gmail.com</a>&gt;
      wrote:<br>
      &gt;<br>
      &gt; Simple yes, but consistent too should be a factor.<br>
      &gt;<br>
      &gt; Most questions we have to the user mailing list involve
      people writing DRL not using tooling.<br>
      &gt;<br>
      &gt; So DRL, IMO, has to be seen as the &quot;tool&quot; to author rules.
      Drop the proposed colon altogether or make it&#39;s use consistent.<br>
      &gt;<br>
      &gt; On 20 April 2011 17:42, Mark Proctor &lt;<a href="mailto:mproctor@codehaus.org" target="_blank">mproctor@codehaus.org</a>&gt;
      wrote:<br>
      &gt;&gt;<br>
      &gt;&gt; My personally opinion is to keep the language simple and
      instead have the tooling inject what ever is necessary as a
      visulation. Be it different colouring, hover over or graphic
      symbol. It keeps the language simple and actually achieve the
      desired result better.<br>
      &gt;&gt;<br>
      &gt;&gt; Mark<br>
      &gt;&gt; On 20/04/2011 14:00, Leonardo Gomes wrote:<br>
      &gt;&gt;<br>
      &gt;&gt; +1 for Michael&#39;s suggestion.<br>
      &gt;&gt;<br>
      &gt;&gt; It&#39;s a bit more verbose, but makes things clear.<br>
      &gt;&gt;<br>
      &gt;&gt; The semicolon here:<br>
      &gt;&gt; ?editableThings(food : ?, loc;)<br>
      &gt;&gt;<br>
      &gt;&gt; Is a typo, right? You actually meant:<br>
      &gt;&gt;<br>
      &gt;&gt; ?editableThings(food : ?, loc);<br>
      &gt;&gt;<br>
      &gt;&gt; - Leo.<br>
      &gt;&gt;<br>
      &gt;&gt;<br>
      &gt;&gt;<br>
      &gt;&gt; On Wed, Apr 20, 2011 at 11:59 AM, Michael Anstis &lt;<a href="mailto:michael.anstis@gmail.com" target="_blank">michael.anstis@gmail.com</a>&gt;
      wrote:<br>
      &gt;&gt;&gt;<br>
      &gt;&gt;&gt; Hmmmmm....<br>
      &gt;&gt;&gt;<br>
      &gt;&gt;&gt; Personally, I don&#39;t like the use of &quot;:&quot; i isolation
      as it&#39;s what we currently use to bind variables and I feel
      &quot;cheese:&quot; as an output definition could just make people question
      whether they&#39;ve missed something. Perhaps &quot;cheese : ?&quot; would be a
      viable alternative. This would be in keeping with (a) current
      variable declaration, (b) the use of &quot;?&quot; to identify a call to a
      query. Geoffrey&#39;s examples would then become:-<br>
      &gt;&gt;&gt;<br>
      &gt;&gt;&gt; rule outputinput<br>
      &gt;&gt;&gt; when<br>
      &gt;&gt;&gt;     Here( loc : location)<br>
      &gt;&gt;&gt;     ?editableThings(food : ?, loc;)<br>
      &gt;&gt;&gt; then<br>
      &gt;&gt;&gt;     System.out.println(&quot;Food &quot; + food + &quot; at location
      &quot; + loc);<br>
      &gt;&gt;&gt;     // Output:<br>
      &gt;&gt;&gt;     // Food crackers at location kitchen<br>
      &gt;&gt;&gt;     // Food apple at location kitchen<br>
      &gt;&gt;&gt; end<br>
      &gt;&gt;&gt;<br>
      &gt;&gt;&gt; rule outputOutput<br>
      &gt;&gt;&gt; when<br>
      &gt;&gt;&gt;     ?editableThings(food : ?, loc : ?;)<br>
      &gt;&gt;&gt; then<br>
      &gt;&gt;&gt;     System.out.println(&quot;Food &quot; + food + &quot; at location
      &quot; + loc);<br>
      &gt;&gt;&gt;     // Output:<br>
      &gt;&gt;&gt;     // Food crackers at location kitchen<br>
      &gt;&gt;&gt;     // Food apple at location kitchen<br>
      &gt;&gt;&gt;     // Food chocolate at location living room<br>
      &gt;&gt;&gt;     // Food chips at location living room<br>
      &gt;&gt;&gt; end<br>
      &gt;&gt;&gt;<br>
      &gt;&gt;&gt; rule typo<br>
      &gt;&gt;&gt; when<br>
      &gt;&gt;&gt;     Here( looc : location)<br>
      &gt;&gt;&gt;     ?editableThings(food : ?, loc : ?;)<br>
      &gt;&gt;&gt; then<br>
      &gt;&gt;&gt;     System.out.println(&quot;Food &quot; + food + &quot; at location
      &quot; + loc);<br>
      &gt;&gt;&gt;     // Output:<br>
      &gt;&gt;&gt;     // Food crackers at location kitchen<br>
      &gt;&gt;&gt;     // Food apple at location kitchen<br>
      &gt;&gt;&gt;     // Food chocolate at location living room<br>
      &gt;&gt;&gt;     // Food chips at location living room<br>
      &gt;&gt;&gt;     // looc is just an unused bound variable<br>
      &gt;&gt;&gt; end<br>
      &gt;&gt;&gt;<br>
      &gt;&gt;&gt; On 20 April 2011 10:16, Geoffrey De Smet &lt;<a href="mailto:ge0ffrey.spam@gmail.com" target="_blank">ge0ffrey.spam@gmail.com</a>&gt;
      wrote:<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; Mark and I were discussing backwards chaining<br>
      &gt;&gt;&gt;&gt;   <a href="http://blog.athico.com/2011/04/backward-chaining-emerges-in-drools.html" target="_blank">http://blog.athico.com/2011/04/backward-chaining-emerges-in-drools.html</a><br>
      &gt;&gt;&gt;&gt; on IRC and we &#39;d like your opinion on a design
      issue.<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; The example<br>
      &gt;&gt;&gt;&gt; ========<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; Let&#39;s say you have this data:<br>
      &gt;&gt;&gt;&gt;   Location(&quot;crackers&quot;, &quot;kitchen&quot;)<br>
      &gt;&gt;&gt;&gt;   Location(&quot;apple&quot;, &quot;kitchen&quot;)<br>
      &gt;&gt;&gt;&gt;   Location(&quot;chocolate&quot;, &quot;living room&quot;)<br>
      &gt;&gt;&gt;&gt;   Location(&quot;chips&quot;, &quot;living room&quot;)<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; Let&#39;s say you have this code:<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; query editableThings( String thing, String
      location )<br>
      &gt;&gt;&gt;&gt;     Location(thing, location)<br>
      &gt;&gt;&gt;&gt; end<br>
      &gt;&gt;&gt;&gt; And then these 3 rules:<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; rule outputinput<br>
      &gt;&gt;&gt;&gt; when<br>
      &gt;&gt;&gt;&gt;     Here( loc : location)<br>
      &gt;&gt;&gt;&gt;     ?editableThings(food, loc;)<br>
      &gt;&gt;&gt;&gt; then<br>
      &gt;&gt;&gt;&gt;     System.out.println(&quot;Food &quot; + f + &quot; at
      location &quot; + loc);<br>
      &gt;&gt;&gt;&gt;     // Output:<br>
      &gt;&gt;&gt;&gt;     // Food crackers at location kitchen<br>
      &gt;&gt;&gt;&gt;     // Food apple at location kitchen<br>
      &gt;&gt;&gt;&gt; end<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; rule outputOutput<br>
      &gt;&gt;&gt;&gt; when<br>
      &gt;&gt;&gt;&gt;     ?editableThings(food, loc;)<br>
      &gt;&gt;&gt;&gt; then<br>
      &gt;&gt;&gt;&gt;     System.out.println(&quot;Food &quot; + f + &quot; at
      location &quot; + loc);<br>
      &gt;&gt;&gt;&gt;     // Output:<br>
      &gt;&gt;&gt;&gt;     // Food crackers at location kitchen<br>
      &gt;&gt;&gt;&gt;     // Food apple at location kitchen<br>
      &gt;&gt;&gt;&gt;     // Food chocolate at location living room<br>
      &gt;&gt;&gt;&gt;     // Food chips at location living room<br>
      &gt;&gt;&gt;&gt; end<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; rule typo<br>
      &gt;&gt;&gt;&gt; when<br>
      &gt;&gt;&gt;&gt;     Here( looc : location)<br>
      &gt;&gt;&gt;&gt;     ?editableThings(food, loc;)<br>
      &gt;&gt;&gt;&gt; then<br>
      &gt;&gt;&gt;&gt;     System.out.println(&quot;Food &quot; + f + &quot; at
      location &quot; + loc);<br>
      &gt;&gt;&gt;&gt;     // Output:<br>
      &gt;&gt;&gt;&gt;     // Food crackers at location kitchen<br>
      &gt;&gt;&gt;&gt;     // Food apple at location kitchen<br>
      &gt;&gt;&gt;&gt;     // Food chocolate at location living room<br>
      &gt;&gt;&gt;&gt;     // Food chips at location living room<br>
      &gt;&gt;&gt;&gt; end<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; The discussion<br>
      &gt;&gt;&gt;&gt; =========<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; Both rules have the same statement:<br>
      &gt;&gt;&gt;&gt;   ?editableThings(food, loc;)<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; In the outputInput rule, &quot;loc&quot; is an input
      variable.<br>
      &gt;&gt;&gt;&gt; In the outputOutput rule, &quot;loc&quot; is an output
      variable.<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; I am wondering if we don&#39;t need a visual
      demarcation that a variable is an output variable,<br>
      &gt;&gt;&gt;&gt; to make it stand out of an input variable?<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; Proposition 1: Suffix output variables with &quot;:&quot;<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; rule outputinput<br>
      &gt;&gt;&gt;&gt; when<br>
      &gt;&gt;&gt;&gt;     Here( loc : location)<br>
      &gt;&gt;&gt;&gt;     ?editableThings(food:, loc;)<br>
      &gt;&gt;&gt;&gt; then ... end<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; rule outputOutput<br>
      &gt;&gt;&gt;&gt; when<br>
      &gt;&gt;&gt;&gt;     ?editableThings(food:, loc:;)<br>
      &gt;&gt;&gt;&gt; then ... end<br>
      &gt;&gt;&gt;&gt; rule typo<br>
      &gt;&gt;&gt;&gt; when<br>
      &gt;&gt;&gt;&gt;     Here( looc : location)<br>
      &gt;&gt;&gt;&gt;     ?editableThings(food:, loc;) // compiler
      error because input variable loc is not declared<br>
      &gt;&gt;&gt;&gt; then ... end<br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;&gt; --<br>
      &gt;&gt;&gt;&gt; With kind regards,<br>
      &gt;&gt;&gt;&gt; Geoffrey De Smet<br>
      &gt;&gt;&gt;&gt; _______________________________________________<br>
      &gt;&gt;&gt;&gt; rules-dev mailing list<br>
      &gt;&gt;&gt;&gt; <a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>
      &gt;&gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
      &gt;&gt;&gt;&gt;<br>
      &gt;&gt;&gt;<br>
      &gt;&gt;&gt;<br>
      &gt;&gt;&gt; _______________________________________________<br>
      &gt;&gt;&gt; rules-dev mailing list<br>
      &gt;&gt;&gt; <a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>
      &gt;&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
      &gt;&gt;&gt;<br>
      &gt;&gt;<br>
      &gt;&gt;<br>
      &gt;&gt; _______________________________________________<br>
      &gt;&gt; rules-dev mailing list<br>
      &gt;&gt; <a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>
      &gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
      &gt;&gt;<br>
      &gt;&gt;<br>
      &gt;&gt; _______________________________________________<br>
      &gt;&gt; rules-dev mailing list<br>
      &gt;&gt; <a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>
      &gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
      &gt;&gt;<br>
      &gt;<br>
      &gt;<br>
      &gt; _______________________________________________<br>
      &gt; rules-dev mailing list<br>
      &gt; <a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a><br>
      &gt; <a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a><br>
      &gt;<br>
      <br>
      <pre><fieldset></fieldset>
_______________________________________________
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><pre cols="72">-- 
With kind regards,
Geoffrey De Smet</pre>
  </div>

<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>
<br></blockquote></div><br>