Typos in Julia

This could be a silly question, but why this -> is accepted and does not?
The latter does really help me in the readability of my code and, in my case, is obtained with alt + 26. Is there a future development on it?

You can already have it, if you setup the proper font + IDE with JuliaMOno combo (or whatever lets you have code ligatures).

Most people will use the Julia VSCode plugin and that will work.

As for why it doesn’t work today, I think that nobody has bothered to implement it yet, but I you are free to look at previous parser PRs.


One example of a previous discussion: Use `\mapsto` ( ↦ ) for anonymous functions · Issue #11223 · JuliaLang/julia · GitHub

For a good list of fonts that support these replacements (aka “ligatures”), visit https://devfonts.gafi.dev – Julia syntax is available!. Note that fonts don’t replace two characters (- and >) with some suitable single Unicode character (eg , U2192), but rather with two non-Unicode glyphs that give you what looks like a wide arrow.

1 Like

It reminds me my old Github issue (with a PR I opened), especially the similarity with as alias for ...… You have made me wonder why I forgot to mention this symbol that I use almost everyday…

1 Like