Avoid unicode versions of ASCII operators

ASCII operators (such as ->) should be preferred over their fancy unicode equivalents (such as ).

Reason

While they’re supposed to be equivalent, they’re not, at least as far as priority is concerned:

This makes the following code legal:

1 -> 4 / 2 // Equivalent to 1 -> (4 / 2)
// res0: (Int, Int) = (1, 2)

The following code, on the other hand, isn’t:

1  4 / 2 // Equivalent to (1 → 4) / 2
// error: value / is not a member of (Int, Int)
// 1 → 4 / 2 // Equivalent to (1 → 4) / 2
// ^^^^^^^

This violates reasonable assumptions about the behaviour of unicode operators, and is an accident waiting to happen. Better to avoid them altogether and rely on fonts with ligature support or editor support for fancy display.

Checked by

LinterRule
Scalastyle