Stories
Slash Boxes
Comments

SoylentNews is people

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 DannyB on Monday July 24 2017, @04:15PM

    by DannyB (5839) Subscriber Badge on Monday July 24 2017, @04:15PM (#543748) Journal

    In some programming languages, you can use unicode symbols. In Clojure (a lisp dialect) you can define things like, lambda, pi, tau, e, not-equal, and other unicode characters. For example . . .

    (defmacro λ [& rest] `(fn ~@rest))

    (def π (. Math PI))
    (def τ (* 2.0 π))
    (def ℯ (. Math E))

    (defmacro ≠ [& rest] `(not (= ~@rest)))
    (defmacro ≤ [& rest] `(= ~@rest))

    You can google for using unicode in Java.

    This example [stackoverflow.com] uncovers something even more interesting.

    int \u1234;

    Yes, you can write characters using the backslash notation.

    private static final String APP_COPYRIGHT_NOTICE = "Copyright \u00A9 2017 Happy Halls Insane Asylum. All rights reserved.";

    Any Java "language lawyer" knows that the backslash characters are processed even before the tokenizer and comments processing! I'm sure the more imaginative among you can think of clever uses for this. Hint, two unocode characters form a comment so you could have code that is commented, but doesn't look commented. Or vice versa. Or simply make sections of fully legal, compilable code completely unreadable by puny humans.

    --
    The lower I set my standards the more accomplishments I have.
    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2