17 ms·
All well-known programming languages will do the shift first.
by TwoBit 6y ago
All well-known programming languages will do the shift first.
- thehobgoblin 6y agoI looked at about 20 different "popular" languages and I believe that only 2 (Go and Swift) of them have shifts at a higher precedence than addition. I think I'm missing a reference/joke =/
- hemdawgz 6y agoOr this might just be another confident but baseless HN commenter assertion.
- copascetic 6y agoC, C++, Java, and Rust all have shift as lower precedence than addition/subtraction. Edit: and Javascript, Python.
- recursive 6y agoYou can add C# as well.