Hacker News new | ask | show | jobs
by nxpnsv 2349 days ago
This is like saying you shouldn’t render latex. I like my ligature font, it makes nicer to read code for me, not terrible at all. Your programming font is a personal choice, i guess when publishing a tutorial you need to consider which font is appropriate, but that doesn’t make anything terrible.
1 comments

The opposite really, it's like publishing unrendered latex and have the reader render it in their head or run it through a latex renderrer themselves
Ok. However, I publish all my code in plain text. Arguably this this is the normal way code gets distributed, unless you edit in word... The choice of font, syntax highlighting, editor, etc are personal choices, what is terrible for you might not be terrible for me.
You publish your code in plaintext, it goes to github where someone reads it through some fancyfying code formatter that github applies to it and which might not even do the same ligatures as your editor. I'm not saying this is a dire problem, or a problem with you or even this specific font - rather the idea of ligatures in program source code to begin with, somewhat similar to using code identifiers (as opposed to literals or comments) outside of ascii-compatible characters of unicode.
Once I got used to ligatures, they did aid flow for me.

-> now needs more internal “rendering” than → does.

Same with ≡ vs ===

That's not a very good thing, especially considering that there are (probably ?) actual unicode characters '→' and '≡' that are not valid syntax for -> and === in languages that utilize the later.
Good for who? In an IDE the person reading them knows what don’t they are using, and so won’t get confused. The IDE itself knows what language the code is in and will highlight invalid syntax.
Languages like Agda allow → or -> interchangeably in the body of the code: https://agda.readthedocs.io/en/v2.5.2/language/lexical-struc...

Most languages only allow such symbols in strings, though, so it's pretty simple:

- Symbols outside of a string literal are ligatures.

- Symbols inside strings are the real symbol.

Ligatures are also rendered differently to any similar unicode characters.