The #julialang defines a number of standard constants and operators as Unicode symbols. Want to find out how to write mathy code? Continue reading this thread below.



Math constants and common functions:
Ï: pi constant
âŻ: Eulerâs number
â: square root function
â: cube root function
Ă·: integer division operator
â»: XOR operator
2/11
Ï: pi constant
âŻ: Eulerâs number
â: square root function
â: cube root function
Ă·: integer division operator
â»: XOR operator
2/11
Membership operators
â: is in
â: is not in
â: contains
â: does not contain
3/11
â: is in
â: is not in
â: contains
â: does not contain
3/11
Comparison operators
â: is approximately equals to
â: is not approximately equals to
â : does not equal
âĄ: is identical to
âą: is not identical to
â€: less than or equal to
â„: greater than or equal to
4/11
â: is approximately equals to
â: is not approximately equals to
â : does not equal
âĄ: is identical to
âą: is not identical to
â€: less than or equal to
â„: greater than or equal to
4/11
Set operators
â©: intersection of
âȘ: union of
â: is subset of
â: is superset of
â: is not subset of
â: is not superset of
â: is subset but not equal to
â: is superset but not equal to
5/11
â©: intersection of
âȘ: union of
â: is subset of
â: is superset of
â: is not subset of
â: is not superset of
â: is subset but not equal to
â: is superset but not equal to
5/11
Using Unicode can make the code look more concise. However, it takes more effort to enter Unicode symbols. The julia langugage manual has a great reference table for Unicode inputs. See https://docs.julialang.org/en/v1/manual/unicode-input/
6/11
6/11
Is it a good idea to use Unicode symbols in code? It think it depends on context. If the programmers are good with math then it is a godsend to be able to read/write code with Unicode. Remember: we need to consider not just the author but also future maintainers of the code.
7/11
7/11
Note that some fonts such as Fira Code or Cascadia support ligatures. So, even normal code can sometimes be displayed in Unicode anyways. For examples, â and ⥠are displayed as Unicode for !== and === respectively.
8/11
8/11
So how did I find out which Unicode symbols were defined in Base? Itâs actually pretty straight forward.
10/11
10/11
I canât believe youâve come this far
Thank you for reading. I hope you learn something new today.
11/11

Thank you for reading. I hope you learn something new today.
11/11