What do I like about Julia?

:laughing: :laughing: :laughing: :laughing: :laughing: :rage:

Funny how I’d take that as unfortunate of an example, almost as the others. To me it really reads indistinguishable from 0=2π. :upside_down_face:

(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.

3 Likes

Copy and paste the character into Julia’s help mode:

help?> ⬲
"⬲" can be typed by \leftarrowonoplus<tab>
19 Likes

My goodness, how did I not know this!

Thanks :sweat_smile:

1 Like

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.

2 Likes

It could be nice if the Julia vs-code extension showed this information when you’re hovering the cursor over an unicode character.

5 Likes

I want that! Feel like opening an issue?

1 Like

Sure!

Show unicode information on hover · Issue #3153 · julia-vscode/julia-vscode (github.com)

5 Likes