1. 20
  1. 8

    Why, oh why did you have to include ligatures

    1. 9

      I kinda like ligatures. They look pretty. They don’t cause me problems. Tweaking your system for eye candy is fun, even if the eye candy is technically useless.

      Should they be enabled by default? Probably not. Is there a reason to be angry at people who use them? Meh, I don’t think so. Just don’t enable them in your editor and they won’t affect you.

      1. 5

        The first point made by the author is:

        They contradict Unicode

        […] Are you looking at a != ligature that’s shaped like ≠? Or the actual Unicode character 0x2260, which also looks like ≠?

        Yeah the ‘90s called, and yeah they want their charset back, but there are still editors out that that do not render unicode correctly, there are fonts that lack full unicode support. If you value universal readability, don’t use non-ascii code-points in identifiers or literals (use an escape sequence instead) in your program. If your code is being read or accessed in any way other than your own machine, don’t use non-ascii code points.

        The second point made by the author is:

        They’re guaranteed to be wrong sometimes.

        The problem is that ligature substitution is “dumb” in the sense that it only considers whether certain characters appear in a certain order. It’s not aware of the semantic context.

        Agreed, but this is not an objective reason to not use ligatures. I don’t mind imperfection if I can have nice arrows in my editor.

        However, I do believe programming ligatures can be improved. Perhaps editors such as neovim that have syntactic understanding of code with tree-sitter can turn != into its ligatured version when present as the operator, and not when present inside strings or comments.

        1. 5

          Your arguments boils down to “but if you only have ASCII characters in your code files, it’s fine”. Newsflash: basically every sufficiently recent programming language supports Unicode characters in identifiers. Some languages even use them extensively. I’d much rather have support in languages to use the characters that ligatures imitate, and in editors to type those characters, than to live with the flawed solution of changing how your editor displays certain sequences.

          Ligatures obscure the underlying text. They do not transparently improve the reading experience. They change it, obscuring the original text, by replacing parts of it.

          1. 9

            I’ll leave this here for your amusement https://www.sansbullshitsans.com/

            1. 1

              Unfortunately, languages like C are not going to change to make if (a ≠ b) valid, so ligatures are the best we can do.

              1. 1

                And your argument boils down to “I don’t like it”

              2. 1

                Perhaps editors such as neovim that have syntactic understanding of code with tree-sitter can turn != into its ligatured version when present as the operator, and not when present inside strings or comments.

                Xcode does this since it lets you use different fonts for different code elements. Doesn’t Neovim let you do that?

                1. 2

                  Neovim has a “conceal” feature thah can do precisely this, but I’m pretty sure it’s not available only for the regex-based syntax highlighting, not Treesitter.

            2. 2

              I am loving this font. I installed it as a joke but now it’s growing on me. I’m using it for the main text window in IntelliJ with Scientifica as the editor font, so the file viewer is a “smaller font” that looks about the same pixel size as Monocraft.

              1. 3

                always nice to see a scientifica user in the wild, glad you like it!