# Warning against Unicode confusables

**URL:** <https://discourse.julialang.org/t/warning-against-unicode-confusables/108734>\
**Category:** Internals & Design\
**Tags:** unicode\
**Created:** [January 9, 2024, 2:19am UTC](https://discourse.julialang.org/t/warning-against-unicode-confusables/108734 "2024-01-09T02:19:49Z")\
**Posts on this page:** 1\
**Showing post:** 36

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [January 12, 2024, 6:48pm UTC](https://discourse.julialang.org/t/warning-against-unicode-confusables/108734/36 "2024-01-12T18:48:05Z")

</div>

> [@MilesCranmer](#):
>
> I remember this leaving me with a poor first impression of Julia based on my naive assumptions at that time – “How can I even write Julia code in my editor if it needs unicode? I can’t just remember all the commands…”

I agree that this is a real concern — as I wrote in [another post](https://discourse.julialang.org/t/syntax-escape-hatch-for-unicode-haters/108363/80), it’s important for newcomers to realize that they _can_ use Unicode symbols in their code, but they are not _required_ to do so in order to program in Julia.

The question is, what are **actionable ways** to help address this concern? Unicode isn’t going away — many people in computational science are not going to go back to writing `alpha` and `beta` as variable names once they realize that they can write `α` and `β`, nor should they have to. Some possible things to work on might be:

- In tutorial materials aimed at beginners, encourage people to be cautious about Unicode symbols. (You _should_ introduce them at some point, because people will see them in other Julia code, but make sure to emphasize that they are optional, and definitely don’t include them without explanation.) I recently submitted a PR to the _Think Julia_ book to correct just such an issue ([replace "🐢" with "turtle" in examples by stevengj · Pull Request #61 · BenLauwens/ThinkJulia.jl · GitHub](https://github.com/BenLauwens/ThinkJulia.jl/pull/61)), though I’m not sure when/whether it will be merged. Clarifying patches submitted to other tutorials might be helpful too.
- Something in the Julia manual to emphasize this? A new FAQ, or edits somewhere else, a blog post? If you have a good idea for this, please feel free to submit a PR aimed at clarifying this issue to newcomers.
- Maybe an addition to the [style guide](https://docs.julialang.org/en/v1/manual/style-guide/), suggesting that public APIs should typically be ASCII or have ASCII synonyms for accessibility. (Of course, people in specialized fields may choose to disregard this, just as people can disregard anything in the style guide if they wish. The point is not to shame people, but to make sure they appreciate the tradeoffs here.)
- If there are isolated Unicode-only APIs in packages (i.e. some random little thing, not a package designed top-to-bottom to use Unicode symbols), a PR to add an ASCII symbol might well be welcome. (No, [`xor`](https://docs.julialang.org/en/v1/base/math/#Base.xor) doesn’t count here: lack of an infix operator ≠ lack of an API.)
- Implement warnings about confusable symbols in linting tools. (I opened an [issue for Aqua.jl](https://github.com/JuliaTesting/Aqua.jl/issues/259)).
- Others?

---

_[View the full topic](https://discourse.julialang.org/t/warning-against-unicode-confusables/108734)._
