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

Make ▷ (\triangleright) alias for |> #30658

Open
AzamatB opened this issue Jan 9, 2019 · 2 comments
Open

Make ▷ (\triangleright) alias for |> #30658

AzamatB opened this issue Jan 9, 2019 · 2 comments
Labels
parser Language parsing and surface syntax unicode Related to unicode characters and encodings

Comments

@AzamatB
Copy link
Contributor

AzamatB commented Jan 9, 2019

Would give the code with pipes a cleaner look:

[1:5;] |> x -> x.^2 |> sum |> inv

[1:5;] ▷ x -> x.^2 ▷ sum ▷ inv

More arguments in favor:

  1. Does not hurt users, since if someone wants to use some "right-pointing triangle"-like symbol in the code he still has plenty of alternatives available:
   ▶, ▸, ▹, ►, ▻
◁, ◀, ◂, ◃, ◄, ◅

so won't need to resort to piracy

  1. Many coding fonts with ligatures (notably FiraCode) already turn |> into
@JeffBezanson
Copy link
Member

currently has multiply-like precedence, so that would need to change. Does anybody know if/why this would be multiply-like?

@JeffBezanson JeffBezanson added unicode Related to unicode characters and encodings parser Language parsing and surface syntax labels Jan 9, 2019
@chakravala
Copy link
Contributor

One usage of this type of symbol is for normal subgroup notation

https://en.wikipedia.org/wiki/Normal_subgroup

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 unicode Related to unicode characters and encodings
Projects
None yet
Development

No branches or pull requests

3 participants