Funny how I’d take that as unfortunate of an example, almost as the others. To me it really reads indistinguishable from 0=2π
.
(of course not when put aside, but if you don’t have a true zero near, to cross check how it would look in the font, whelp!)
Sorry, but any time you see π
you should be thinking about θ
.
You remind me of an interesting point though. One thing I dislike about Julia.
It’s really easy to enter unicode characters, which I love. However, when reading someone else’s code, it might take me a while to figure out what character they used and how to type it.
For example, what character is this? ⬲
It has a tab-complete shortcut, and it’s an infix operator in the language, but can you find it? (might look better in this font: ⬲)
Just like I can hit \theta<tab>
to get θ
, I should be able to undo it by typing θ<shift+tab>
and get \theta
.
Copy and paste the character into Julia’s help mode:
help?> ⬲
"⬲" can be typed by \leftarrowonoplus<tab>
My goodness, how did I not know this!
Thanks
I added an update there after some years and I think that ultimately I don’t think that Julia is actually homoiconic, but I also don’t think that is particularly important. The crux of homoiconicity is that the syntax for code is the same syntax for the data structure that is used to represent that code—i.e. if the code is (+ a b)
the data structure that represents that code is simply that, quoted: '(+ a b)
. That’s clearly the case in Lisp but isn’t the case in Julia unless you count the “cheat” of using quoted code constructs. But does it matter? Kent Pitman’s quote doesn’t care about this syntax thing at all—it cares about there being commonly used tools for program manipulation, which Julia very much has. The main thing that being homoiconic buys is that it’s much more obvious how to construct the data structure to represent the code you want to generate, but you can still generate code even if the syntax for code isn’t the same as the syntax for the data structure.
It could be nice if the Julia vs-code extension showed this information when you’re hovering the cursor over an unicode character.
I want that! Feel like opening an issue?