Syntax: Escape hatch for unicode haters

For the reasons @mbauman and I noted above, I suspect that adding a huge number of new keywords like \\alpha to the Julia parser seems unlikely to happen, though of course someone can always propose a pull request.

A package (e.g. TextUniVars.jl) that provides e.g. uvar"\alpha\hat" variable names can happen now, as I noted in my very first response on this thread. Other possibilities include someone writing a new editor plugin that displays α as {\alpha} or something, i.e which transparently translates under the hood. Both of these things can be done by any sufficiently motivated person without any changes to Julia itself.

For occasional replies to discourse posts with Unicode identifiers, if you’re not willing to copy-paste a few times a year(?), I suppose you could always include using TextUniVars in your reply.

I suggested some possible actionable items here: Warning against Unicode confusables - #36 by stevengj … of course, people can propose whatever PRs to the style guide or to Julia base that they wish, as long as they can accept that the answer might be “no”.

11 Likes