Hacker News new | past | comments | ask | show | jobs | submit login

I don't use ligatures only because the font is the wrong level of the stack for doing cute things like this. I could totally get behind e.g. combining `->` into a Unicode arrow, but if I'm writing the string `"->"` then I want that to be displayed verbatim. That requires parsing (or at least lexing) the code, which fonts can't do (and if they could, I'd be horrified). IMO, it should be the responsibility of editors and IDEs to do this sort of visual substitution.



Unicode operators can make it difficult if you can't (or don't know how) to type certain characters.

https://docs.raku.org/language/unicode_ascii just kind of rubs me as the wrong way to go.

While I realize '…' and '...' are syntactically equivalent, it means that if someone is writing $foo³ and I need to change that to $foo² - I can't do that without changing it to $foo**2 ... and that results in two different styles of code (unicode and ascii) in the same file which means that future maintainer me has more difficulty.

(note: I still don't know how to type ³ - that's me copying out of another file)


That feels to me that you're blaming a poorly implemented editor / IDE for a language feature.

If you use ² and ³ a lot in your work, I'm sure you can install a macro / keybinding / whatever to access them quickly.

And in any other case, https://docs.raku.org/language/unicode_ascii is a bit of a Rosetta stone in the cases you don't know how to type them, because you can copy / paste them from there.

Finally, the Raku documentation also contains information on how to type these unicode characters on your OS: https://docs.raku.org/language/unicode_entry .


I believe that the language feature is cute.

I'm ok with APL doing all its special characters, but if you can write the same syntax in two ways, one of which is much more accessible than the other, then the less accessible way was a poor design choice.

Allowing for two styles for the same syntax can (and will) lead to multiple styles depending on who wrote that line. Conflicting styles (mixing tabs and spaces anyone?) in turn makes the maintenance of the code more difficult and time consuming which is something that is often forgotten in the rush to write code.


Agda users rely heavily on unicode. It looks like they have editor support for it in the form of backslash sequences that turn into unicode.

They write stuff like:

    Tyᴹ : (A : Ty) → {X₀ X₁ : Set} → (X₀ → X₁) → Tyᴬ A X₀ → Tyᴬ A X₁ → Set
    Tyᴹ ι      Xᴹ α₀ α₁ = Xᴹ α₀ ≡ α₁
    Tyᴹ (ι⇒ A) Xᴹ α₀ α₁ = ∀ x → Tyᴹ A Xᴹ (α₀ x ) (α₁ (Xᴹ x))
I kind of get the "looks like math" thing, but I find the poor typography distracting.

(Sample taken from https://github.com/AndrasKovacs/thesis/blob/main/agda/Simple... - learning the language is still on my todo list.)


I like using more than ASCII. But those superscript numerals are just legacy junk. Superscripts are only in Unicode for the sake of compatibility.


How would you express superscripts in text, then?


You don’t express it in plain text. They claim that it’s the domain of markup.


sup


Not much, ʷᶦᵗʰ ʸᵒᵘ?


Combining `->` into unicode arrow still would require parsing the code to do properly. For example, in firacode this C code:

      int x = 3;
      if (x<-5) {
        return 1;
      }
Renders as:

      int x = 3;
      if (x⬅5) {
        return 1;
      }
which makes no sense.


Totally agree. The worse is those long equal signs, with my eyesight going as I age I have to take close to a second to decipher if it's =, ==, or ===.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: