Hi Chapel Developers -
This is meant to be an update about the precedence changes, and a request for
more comments.
Since you last heard:
- we checked with chapel-users and heard only general encouragement
- I've convinced myself that all the binary operators should have precedence
between + and * (in the earlier patch, that was true only for << >> & ; the
others were looser binding than +). I think it will be easier to work with
the language if one can remember that all bitwise-operators are in one
group with respect to precedence, and we've already decided that << and >>
should be tighter-binding than + (since they can implement
multiply-by-power-of-2).
I havn't heard anyone disagree on this point yet...
- Tom and I have been debating whether or notthe order within the bitwise
operations should be (from loosest-to-tightest) should be
c: | ^ &
tom: | & ^
While many languages have fixed the bitwise operators vs. comparison
operators
problem in C, I haven't seen any that have the order Tom proposed - all that
I surveyed either put | ^ at the same precedence or preserved the C
behaviour.
But Tom's proposal makes the bitwise operators mirror the boolean operators
in precedence. Xor is bit-not-equal, so by analogy should have precedence\
like !=, which is tighter-binding than && (which is in turn tighter-binding
than ||). Besides this argument, which Tom would probably describe very
differently, he has a preservation-of-information argument (^ should bind
tighter since it does not destroy bits) but I'll let him elaborate on that
if he wants.
So, any further thoughts on these matters? Perhaps somebody else could
weigh in?
-michael
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers