Hacker News new | ask | show | jobs
by specialist 2136 days ago
Agree this is a good idea.

To clarify: it'd be cool if language's supported multiple lexemes (?) for a single token. So -> and → (U-2192) are equivalent.

5 comments

Raku does this enthusiastically:

https://docs.raku.org/language/unicode_ascii

I was going to mention Julia.

Not only does it have it, it has it in (what I feel) is a really accessible way. Seen a symbol and you don't know what it is or how to reproduce it? Enter "?" and paste them symbol into the repl and it'll tell you what's it's called, the shortcut to make it, what it does, and the equivalent non-symbol function name.

And while not exactly what the parent asked for, the recently released "JuliaMono" font has ligatures for several common combos - including the right arrow - which amounts to practically the same thing:

https://juliamono.netlify.app/

I've been using Dhall ( https://dhall-lang.org ) and it does this. But it goes a step further: because `dhall format` defines the canonical form of any dhall code, it does the unicode substitution for you. So you get convenient entry with a normal keyboard, plus nice unicode symbols in code.
This is something Comma, the IDE for the Raku Programming Language, also does: https://commaide.com
Haskell has the UnicodeSyntax language extension which accomplished this https://wiki.haskell.org/Unicode-symbols
IIRC Scala has this.