Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: additional plain text arrow symbols #36666

Closed
isaacsas opened this issue Jul 14, 2020 · 5 comments · Fixed by #36729
Closed

Feature request: additional plain text arrow symbols #36666

isaacsas opened this issue Jul 14, 2020 · 5 comments · Fixed by #36729
Labels
parser Language parsing and surface syntax

Comments

@isaacsas
Copy link

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!

@JeffBezanson JeffBezanson added parser Language parsing and surface syntax triage This should be discussed on a triage call labels Jul 15, 2020
@StefanKarpinski
Copy link
Member

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.

@StefanKarpinski
Copy link
Member

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.

@StefanKarpinski StefanKarpinski removed the triage This should be discussed on a triage call label Jul 16, 2020
@JeffBezanson
Copy link
Member

<-- 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.

@isaacsas
Copy link
Author

isaacsas commented Jul 16, 2020

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...)

@isaacsas
Copy link
Author

Thanks for the help!

simeonschaub pushed a commit to simeonschaub/julia that referenced this issue Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parser Language parsing and surface syntax
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants