Julia: Feature request: additional plain text arrow symbols

Created on 14 Jul 2020  Â·  5Comments  Â·  Source: JuliaLang/julia

Right now --> parses as a symbol, along with a fantastic number of unicode arrows. It would be nice if we could also have the reversed arrow, <--, and some kind of reversible plaintext arrow like <-> or <-->. We use such notation in the DiffEqBiological DSL for specifying chemical reactions, i.e. A + B --> C, and have had several requests for some type of reversible arrow notation from several users now for whom using a unicode arrow was problematic.

Thanks!

parser

Most helpful comment

Triage agrees that we may as well have some of these and they can parse like other infix arrow operators. It remains for our resident parsing czar to determine which can be parsed unambiguously.

All 5 comments

Triage agrees that we may as well have some of these and they can parse like other infix arrow operators. It remains for our resident parsing czar to determine which can be parsed unambiguously.

It might also make sense to change the parsing of --> to parse as a normal infix operator. For historical reasons, it parses as its own expression head, which is kind of strange.

<-- and <--> should be ok at least. <-> is probably OK but we can't have <-, since 1<-2 parses as 1 < -2, so it's a bit sketchier.

Getting one of <-> or <--> would be great for us and the best gain. <-- is not particularly needed since users can always go the other direction. (It just seemed reasonable to have for symmetry reasons...)

Thanks for the help!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

helgee picture helgee  Â·  3Comments

StefanKarpinski picture StefanKarpinski  Â·  3Comments

TotalVerb picture TotalVerb  Â·  3Comments

sbromberger picture sbromberger  Â·  3Comments

tkoolen picture tkoolen  Â·  3Comments