3 ms·
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
by seemslegit 7y ago
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
- modernerd 7y agoOnce I got used to ligatures, they did aid flow for me. -> now needs more internal “rendering” than → does. Same with ≡ vs ===
- seemslegit 7y agoThat'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.
- true_religion 7y agoGood 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.
- modernerd 7y agoLanguages like Agda allow → or -> interchangeably in the body of the code: https://agda.readthedocs.io/en/v2.5.2/language/lexical-structure.html#tokens 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.
- nxpnsv 7y agoOk. 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.
- seemslegit 7y agoYou 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.