Abstract Database Interface

Timon Gehr timon.gehr at gmx.ch
Tue Oct 30 15:17:33 PDT 2012


On 10/30/2012 04:47 PM, Philippe Sigaud wrote:
> On Tue, Oct 30, 2012 at 3:44 PM, Jacob Carlborg <doob at me.com> wrote:
>
>> How does that work with operator precedence?
> (...)
>> But because of the operator precedence in Ruby you need to wrap every
>> comparison in parentheses, not very pretty.
>
> I think the problem would the same here. Of course, to know D operator
> precedence, you have to dig into the grammar, since there is no handy
> table to give you that info :)
>

 From higher to lower, where relational ops are unordered with respect 
to bitwise ops (this is the reason comparisons would have to be wrapped 
in parentheses in D as well):

!
=> (not a real operator, occurs twice this is binding power to the left)
. ++ -- ( [
^^ (right-associative)
& ++ -- * - + ! ~ (prefix)
* / %
+ - ~
<< >> >>>
== != > < >= <= !> !< !>= !<= <> !<> <>= !<>= in !in is !is
&
^
|
&&
||
? (right-associative)
/= &= |= -= += <<= >>= >>>= = *= %= ^= ^^= ~= (right-associative)
=> (not a real operator, occurs twice, this is binding power to the right)
,
.. (not a real operator)


More information about the Digitalmars-d-announce mailing list