Live data from Hacker News

Ligatures in programming fonts: hell no (2019)

practicaltypography.com

31–40 of 201 posts

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

#31

Earlier quoted context omitted.

Other people reading your code... on your laptop, using your editor? Because on anyone else's computer it's going to be based on their personal viewing preferences. Setting your tab spacing size too large will also make your code unreadable. But only on your computer.

> Other people reading your code... on your laptop, using your editor? No, rather in your web page, in the slides that you're projecting, in the paper that you typeset into PDF... The point is not about how you edit your own code. You could even write comments in sanskrit, if they are for your eyes only, but please don't dostribute them!

As an aside, I have seen literate French perlcode some time ago that had very good French language comments alongside quite normal western variable and function naming, which I suspect was in everyone's interests.

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

#32
post #25

> Whereas ligatures are going the opposite direction: making distinct characters appear to be others. Yes. On my computer. In my editor. That I am using…because I like ligatures, because they make my code easier to read. For me. Use of ligatures on my setup does not force anyone else to use them? They’re not “viral” like a language feature. “Oh but what if the >= Unicode symbol ends up in your source code and you don…

> Yes. On my computer. In my editor. That I am using…because I like ligatures, because they make my code easier to read. For me. Later in the submission, Butterick addresses this directly, and doesn't disagree: > “What do you mean, it’s not a mat­ter of taste? I like us­ing lig­a­tures when I code.” Great! In so many ways, I don’t care what you do in pri­vate. Al­though I pre­dict you will even­tu­ally burn your­self…

That's a good advice, isn't it? Thanks for pointing to it.

But it is interesting still, how many seem to read the text it feels to them touching their privates and need to make themselves vent off.

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

#33
post #32
post #25

Earlier quoted context omitted.

> Yes. On my computer. In my editor. That I am using…because I like ligatures, because they make my code easier to read. For me. Later in the submission, Butterick addresses this directly, and doesn't disagree: > “What do you mean, it’s not a mat­ter of taste? I like us­ing lig­a­tures when I code.” Great! In so many ways, I don’t care what you do in pri­vate. Al­though I pre­dict you will even­tu­ally burn your­self…

That's a good advice, isn't it? Thanks for pointing to it. But it is interesting still, how many seem to read the text it feels to them touching their privates and need to make themselves vent off.

> how many seem to read the text it feels to them touching their privates and need to make themselves vent off.

Not dissimilar to those choosing to highlight the worst aspects of comments rather than addressing them in good faith. Please don't make things worse.

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

#34
post #28

> Whereas ligatures are going the opposite direction: making distinct characters appear to be others. Yes. On my computer. In my editor. That I am using…because I like ligatures, because they make my code easier to read. For me. Use of ligatures on my setup does not force anyone else to use them? They’re not “viral” like a language feature. “Oh but what if the >= Unicode symbol ends up in your source code and you don…

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?

i program in wingdings

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

#36

I don't mind the look of ligatures too much in most monospace fonts that have them. However, I use my editor and terminal emulator for a lot more than just editing source code in common programming languages. In every single ligature-supporting font I've tried, there are edge cases where glyphs are combined in a way that don't make sense in context, which is jarring enough to not be worth it for me.

Because they are intended to be a tool for typesetters to use in right scenarios - or in your case turn off in wrong ones.

In text editors you can only go all in or not. It is not really intended for that.

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

#37
Ligatures are an interesting contrast to Julia programmers' habit of using actual (non-Latin) Unicode characters in their code. It seemed to me that the use of Greek letters and symbols is actively encouraged in the Julia documentation. I think they advise using editors that allow inputting special characters through their LaTeX equivalent (but source files are then saved to disk with the Unicode characters).

I am not very familiar with the latest trends, could anyone else chime in here? Do Julia coders use fonts with ligatures? That could indeed be one case where confusion is possible. Or maybe not?

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

#38
post #2

Much ado about nothing. It's a matter of personal taste. An actual ≠ has a low chance to sneak into the source code, even lower chance to somehow type it by hand. Either way, it would be a syntax error highlighted by any editor. I'd like my code to look nice and I accept the risks.

It's only a matter of personal taste because it's not statistically examined, so there is no hard evidence in the form of numbers that the yea or nay side could use.

If it were properly studied, and it turned out that ligatures have an effect on the rate of mistakes, then one side of the debate would have to concede that though they choose persist in their personal taste, it is in conflict with what is good for their work.

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

#39
> if you’re preparing your code for others to read—whether on screen or on paper—skip the ligatures.

The article should have led with this. Instead this main caveat is buried in a paragraph, where it is preceded by, what boils down to, "do what you want, but you will recognize its wrong someday." Of course people will focus on that part and on the most prevalent use of ligatures in programming: In their own local editor. (Where people usually have strong opinions about what's the right thing to do.)

The tangent in (1) on how they contradict unicode could have been skipped as well, just go straight to the "the problem is" part. Why? Unicode already "contradicts" itself: △ is WHITE UP-POINTING TRIANGLE (trine) or U+25B3, which I am sure everyone can easily distinguish from the mentioned Δ Greek Capital Letter Delta U+0394 especially when used outside a clear context. (There are other symbols that are easier confused, but I find them close enough for the point, especially because fonts might render them differently.)

For private use, I find ligatures make spotting negations and reading comparisons easier more often than they are wrong. But I see why ligatures might not be a good choice for a presentation or code blocks on a website.

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

#40
post #33
post #32

Earlier quoted context omitted.

That's a good advice, isn't it? Thanks for pointing to it. But it is interesting still, how many seem to read the text it feels to them touching their privates and need to make themselves vent off.

> how many seem to read the text it feels to them touching their privates and need to make themselves vent off. Not dissimilar to those choosing to highlight the worst aspects of comments rather than addressing them in good faith. Please don't make things worse.

Pardon, then you may have misread along my comment, that was not ill intended, just seeing that the article polarizes.
Post reply on HN