> sin(2π)
Is that legal Julia? That's pretty awesome, but how do I type this? I think I need a new keyboard.
> sin(2π)
Is that legal Julia? That's pretty awesome, but how do I type this? I think I need a new keyboard.
Julia editors or VS Code with the Julia plugin support LaTeX commands and will perform autocompletion and convert it to the unicode character.
For example, if you write \nabla it will offer autocompletion and write ∇.
I think it's a neat feature and makes a lot of sense in scientific computing contexts but I feel I wouldn't like a code-base that abuses it too much. Sprinkled here and there can help make code more readable, succinct and pleasant.
This is why I think it was a poor design choice to include the feature and actively encourage its use. The benefit of potentially more succint code is far outweighed by having to look with a codebase written entirely in Greek and there's no way to enforce moderation.
See here https://docs.julialang.org/en/v1/manual/unicode-input/
Works for all greek letters, and other unicode characters.
For example, on Windows I use Wincompose [1], that lets me type things like "⋄*g" for Greek gamma: 'γ', or "⋄ee" for 'ə', or even "⋄⋄plane" for a '' (and of course the list is customizable). The "⋄" symbol represents the Compose key, which I chose to map to the Caps Lock key on my keyboard.
Edit: HN removed the airplane icon.