incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henry Story <henry.st...@bblfish.net>
Subject Re: EzGraph
Date Fri, 01 Jul 2011 15:48:11 GMT
On 1 Jul 2011, at 17:24, reto@apache.org checked in 

> 
> URL: http://svn.apache.org/viewvc?rev=1141963&view=rev
> Log:
> CLEREZZA-510: using <-- instead of -<- for inverse properties

Did you read the documentation for why I chose -<- ?
The reason is that with <-- you change the priority of the operators and so things get
more
complicated for the developer to work with, as he has to remember carefully the following

<blockquote>
      The precedence of an infix operator is determined by the operator’s first character.
      Characters are listed below in increasing order of precedence, with characters on
      the same line having the same precedence.
              (all letters)
               |
               ^
              &
              < >
              = !
              :
             + -
             * / %
           (all other special characters)

    That is, operators starting with a letter have lowest precedence, followed by operators
    starting with ‘|’, etc.
    There’s one exception to this rule, which concerns assignment operators(§6.12.4).
    The precedence of an assigment operator is the same as the one of simple assignment
    (=). That is, it is lower than the precedence of any other operator.
    The associativity of an operator is determined by the operator’s last character. Operators
    ending in a colon ‘:’ are right-associative. All other operators are leftassociative.
 </blockquote>



Henry


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message