Mentioned in #11223: \mapsfrom
↤
(U+21A4) is not currently parsed as an infix operator. It should be parsed with the same precedence as \mapsto
(↦
).
This doesn't really belong on the 1.0 milestone since fixing this will not break any code. Of course it would be nice to have, and if someone implements it, great, but it's not a release blocker.
Currently it is parsed as an identifier for some reason, so this would be a breaking change:
julia> ↤ = 7
7
julia> ↤ + 2
9
However, many of the things in the Arrows block are parsed as operators, so U+21A4 must have been an oversight. We should go through and make sure that everything in this block is included.
One issue with some of the elements of the arrows block is precedence. Horizontal arrows are parsed with -->
precedence, and vertical arrows are parsed with ^
precedence, but I wasn't sure what to do with things like ↗
or ↺
Maybe leftward arrows should also be right-associative? (#24153)
Ideally if x ↦ y ↦ z
is (x ↦ y) ↦ z
then z ↤ y ↤ x
should be z ↤ (y ↤ x)
.
I was confused: all arrow-precedence operators are currently right associative. I believe that is standard both in logic and type notation (mumble mumble isomorphism). |>
and <|
have their own precedence level and are left associative, and arguably <|
should be changed to right associative.
Currently everything in the arrows block with category Sm is parsed as an operator, which is good. For every remaining arrow character, we should either parse it as an arrow if it's obviously a sensible mathematical operator, or make it an invalid character. Then the invalid characters can be added as needed, if ever.
Most helpful comment
Maybe leftward arrows should also be right-associative? (#24153)