Live data from Hacker News

Ligatures in programming fonts: hell no (2019)

practicaltypography.com

101–110 of 201 posts

Re: Ligatures in programming fonts: hell no (2019)

#101
> ... my main con­cern is ty­pog­ra­phy that faces other hu­man be­ings. So if you’re prepar­ing your code for oth­ers to read—whether on screen or on pa­per—skip the lig­a­tures.

With all due respect, am I the only one expecting a strong argument for why ligatures on my own personal machine's terminal emulator should go?

I think "code for others to read" having to be free of ligatures was never in dispute at all. Unfortunately, the most significant reason isn't even mentioned: people's lack of awareness of the existence of programmer font ligatures. In clear terms: a confusion between != and ≠ does NOT exist for people who don't know of the existence of ligatures: they'll straight up believe they're looking at a ≠. (* if not slightly put off by the spacing around the character).

The one thing I did take away from this, is that people using Polacode/CodeSnap and the likes, should probably be aware to disable ligatures before exporting their pictures.

Re: Ligatures in programming fonts: hell no (2019)

#102
post #73
post #69

A page that does not load any content with disabled JavaScript: hell no I mean am I the only one that is browsing with completely disabled JS by default? :-D More and more sites don't load anything withnout a JS and I'm not talking about advanced apps like Microsoft Office online...

> I mean am I the only one that is browsing with completely disabled JS by default? :-D I have no patience for that. There’s enough frustration in my life without inflicting more on myself.

I find myself far less frustrated with the web with JS disabled than with it enabled by default.

Re: Ligatures in programming fonts: hell no (2019)

#103
post #28

Earlier quoted context omitted.

Just was wondering if today anyone is still using them, so I guess that does not need to be asked. All right, oh my captain, keep the indents and spacing tight on the monospace and sail along! Btw., anyone still using monospaced fonts in their editors?

The only people I've ever seen or heard of using proportional fonts for programming were utterly clueless freshmen newbs who mistook MS Word for a text editor...

Flash also come with a proportional font by default in the ActionScript editor if I remember correctly. I believe Adobe has changed its mind for other products with scripting support.

Re: Ligatures in programming fonts: hell no (2019)

#104
post #74

I initially had this same reaction. Well, perhaps less stridently assembled, but my initial take on it was the same: that ligatures for coding fonts were objectively dumb. But, I was wrong. In several years of using them now, there has never been even one case of the theoretical "mistaking a different glyph that looks similar to the ligature" or "mistaking a ligature character sequence for a single character". It's n…

> Allman brace style

If only that could be as easily configurable in IDE as liatures.

Re: Ligatures in programming fonts: hell no (2019)

#106

> The problem? Many of the programming ligatures shown above are easily confused with existing Unicode symbols. How so? It's either a ligature or a syntax error: weird unicode symbols can't be valid operators and operator ligatures cannot be valid identifiers. The exception would be string literals, though that situation would be quite rare - probably less common than ambiguity due to different but similar-looking un…

I agree the "confused w Unicode symbols" arg is pretty weak.

As for "people don't mind [tabs] at all", some people mind very much and consider them pollution. If you mean _some_ people don't mind tabs, ie you're highlighting that tabs vs spaces is a bigger deal than ligatures, I concur.

The logical reason to prefer spaces is that the choice is not "spaces vs tabs", it's "spaces vs (tabs and spaces)", and that mix of (tabs and spaces) is highly problematic.

Re: Ligatures in programming fonts: hell no (2019)

#107
post #23
post #9

I gotta say I’m a little tired of using * for multiplication. It’s time for programming languages that use Unicode characters for operators, and let the editor replace != with the Unicode slashed equals character. No ligatures, just operators.

There are really two separate issues here - ligatures in the classic typographic sense, such as æ, and having some way to type mathematical symbols useful in programming, such as ≠ and ⨯, without having cntl-alt-meta-super keyboard combos to remember. The former doesn't help in programming. The latter is fairly standard for ideographic languages, and has been well worked out for Chinese and Japanese.

> has been well worked out for Chinese and Japanese.

Not really. Typing CJK text is a tedious and frustrating experience. People cope with it because no one has come up with a better alternative.

Both Chinese and Japanese alphabets have way too many characters to fit on a keyboard. To deal with this, CJK users type in the English spelling and convert it to CJK characters using software called input method editors (IMEs).

The problem is, this conversion process is often not straightforward. Unlike English, CJK sentences don't have spaces in them so IMEs have to guess how to split sentences into words. Then, it has to identify the right words, which is complicated due to the existence of homophones.

To deal with all the ambiguity involved in this conversion process, IMEs rely on predictions to provide users with a list of possible conversion candidates.

This leads to an awful typing experience in which users have to constantly choose from the IME-provided list for every little snippet of text. This is distracting, slows down typing, and makes key presses non-deterministic. To make matters worse, IMEs sometimes get things wrong and users have to get "creative" to work around it.

In comparison, typing English text is a breeze. You can just type what you want directly.

Re: Ligatures in programming fonts: hell no (2019)

#108
Not technically ligatures, but the author does touch on quote marks. I see a lot of website engines swap " out for “ and ” in code snippets and it's annoying if you copy / paste a line. Especially if it's for a language with loose syntax like shell script that doesn't catch it while parsing.

Re: Ligatures in programming fonts: hell no (2019)

#109

Not technically ligatures, but the author does touch on quote marks. I see a lot of website engines swap " out for “ and ” in code snippets and it's annoying if you copy / paste a line. Especially if it's for a language with loose syntax like shell script that doesn't catch it while parsing.

MS Word has this feature and it calls them "Smart Quotes"

Re: Ligatures in programming fonts: hell no (2019)

#110
post #78

Earlier quoted context omitted.

That's fun but how do I type them?

A Compose key is the best general-purpose way. For example: • ≥: Compose > = • ≠: Compose / = You can define your own sequences too, if you want. I like to type exactly what I mean, including curly quotes and dashes and narrow no-break spaces and emoji and so on, but often didn’t like the default mappings (if there were any). As an example, I use this for curly quotes (look at the keys’ locations on the keyboard to u…

Fun but I tend to type code fast. Really dont need an extra modifier key.

Not to mention there isnt one on your regular keyboard.

Post reply on HN