3 ms·
Operators were first introduced in programming languages for arithmetic, .e.g. Fortran, but they've evolved beyond that. As an example, Scala gives precedence t
by vorg 12y ago
Operators were first introduced in programming languages for arithmetic, .e.g. Fortran, but they've evolved beyond that. As an example, Scala gives precedence to operators based on the first token in the op, so e.g.
*>> has higher precedence than +~< because * "beats" +
Golang treats
* / and & as having the same precedence, and ditto with + - and |