Stories
Slash Boxes
Comments

SoylentNews is people

SoylentNews is powered by your submissions, so send in your scoop. Only 18 submissions in the queue.
posted by Fnord666 on Monday July 24 2017, @03:39AM   Printer-friendly
from the not-no-but-... dept.

Submitted via IRC for Bytram

Ligatures in programming fonts — a misguided trend I was hoping would collapse under its own illogic. But several readers have already sent me this new argument in favor.

Let me save you some time:

Ligatures in programming fonts are a terrible idea.

And not because I’m a purist or a grump. (Some days, but not today.) Programming code has special semantic considerations. Ligatures in programming fonts are likely to either misrepresent the meaning of the code, or cause miscues among readers. So in the end, even if they’re cute, the risk of error isn’t worth it.

There are good reasons we have Unicode and this is NOT one of them.

Source: http://tinyletter.com/mbutterick/letters/q-ligatures-in-programming-fonts-a-hell-no


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2) by Jesus_666 on Monday July 24 2017, @09:01AM (1 child)

    by Jesus_666 (3044) on Monday July 24 2017, @09:01AM (#543616)
    And that's fine when there is a language-wide convention for it. But if ≠ starts showing up in someone's C++ IDE and is read by someone who isn't aware of the peculiarities of that programmer's font that other person sees a Unicode math glyph in C++ source code. Even if you implement the fot organization-wide and train everyone on it, you now have one program (the IDE) where text input appears to work differently from every other program.

    I can see an argument behind using ligatures to make things like /* a bit clearer by tweaking the kerning. I don't agree with making -> look like → just because it's cute.
    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 1, Informative) by Anonymous Coward on Monday July 24 2017, @12:54PM

    by Anonymous Coward on Monday July 24 2017, @12:54PM (#543652)

    Yeah, but if this "shows up" in someone's IDE, it's because they set it up that way, so they'll be well aware of it. Unless you're in the habit of collaborating through emailed screenshots of IDEs, I don't see why someone else would be looking at code in your IDE, but you aren't right there to explain.

    CODER1: Hey, I need a fresh set of eyes on this, can you look at this loop and spot the error?
    CODER2: Sure... wait, WTF! Is that a unicode inequality symbol?! Have you been #defineing high?
    CODER1: Nah, bruh, that's ASCII bang-equal in the file, I just have emacs set to display it as a ligature.
    CODER2: Well, okay then... *mimes masturbation*