Closed
Description
Scrutinizing the operator precedence table, it struck me as a bit odd that bit shift operators have their own precedence level, strictly lower than multiplication. a*b>>c*d
is an ugly expression to be sure, but it's parsed as (a*b)>>(c*d)
, which doesn't make a whole lot of sense.
Since a<<b
means a*2^b
, <<
should perhaps have the same precedence as *
, or maybe even the same precedence as ^
. Or maybe it should be moved to one notch higher than *
, instead of one notch lower (putting it between *
and //
).