Live data from Hacker News

Read and understand code faster with programming ligatures in Fira Code font

visualstudioextensions.vlasovstudio.com

11–20 of 43 posts

Re: Read and understand code faster with programming ligatures in Fira Code font

#11
I've been using this in IntelliJ IDEA for about a month.

The experience reminds me of adopting an anti-aliased font for coding, for the first time (many years ago). First half an hour of unfamiliarity and skepticism, then it just seems very natural, and reading code feels smoother and easier and more productive.

I absolutely cannot stand code in non-monospaced fonts, so I don't think there are any alignment problems. (The look of Fira Mono / Fira Code isn't really to my taste though, so I'm hoping for the same things to start popping up in other fonts too!)

Re: Read and understand code faster with programming ligatures in Fira Code font

#13
post #11

I've been using this in IntelliJ IDEA for about a month. The experience reminds me of adopting an anti-aliased font for coding, for the first time (many years ago). First half an hour of unfamiliarity and skepticism, then it just seems very natural, and reading code feels smoother and easier and more productive. I absolutely cannot stand code in non-monospaced fonts, so I don't think there are any alignment problems.…

There are lots of others - my personal favourite is Monoid. http://larsenwork.com/monoid/

Re: Read and understand code faster with programming ligatures in Fira Code font

#14
This isn't really what I thought it would be. I don't want != changed to ≠ because ≠ isn't a C++ operator.

What I thought would be true ligatures ("tying together") of "&&" which could still be recognized as a pair of ampersands, but by being conjoined cleanly appear to be symbol in their own right, which is what "&&" is.

However part of the value of ligatures is symbol tightness, which is defeated by the need for a monospaced font.

Still, I'm glad people are experimenting!

Re: Read and understand code faster with programming ligatures in Fira Code font

#15
I love typography and ligatures, but this introduces a layer of abstraction in your source code. I know it sounds depressingly uninternational, but I don't even like to use Unicode characters in my text files. I prefer a one-to-one mapping of keyboard button to on-screen character. Although I suppose even capital letters break that rule, so maybe one day I'll give it a whirl.

Re: Read and understand code faster with programming ligatures in Fira Code font

#16
I would be very hesitant to use this. It's not "more intuitive" as the author would like to think. In fact , our visual system has been trained to instantly recognize a!=b in code, and I read code a lot more often than Math formulas. Plus code is not math (e.g. 1+(a>0)), confusing = with == will lead to lots of errors etc.

If I get used to this font on my machine, i will have a real problem when parsing code in another terminal/editor. Unless all the programmers in the world decide to switch to it simultaneously, this introduces a mental translation that's counterproductive.

Re: Read and understand code faster with programming ligatures in Fira Code font

#17

Lua's not equals `~=` gets ligatured to ≃ instead of ≠. Expected but unfortunate.

Most of Lua was nicely obvious and intuitive, but ~= was always one of the weird sharp edges. I could maybe see the argument for using it if ~ was already a negation operator of some sort (like C's bitwise complement) but Lua doesn't even have that. Instead you get something needlessly non-intuitive and subject to misinterpretation by anyone who isn't a Lua native, as ~= as an ASCIIfication of ≃ is pretty common.

Re: Read and understand code faster with programming ligatures in Fira Code font

#18
post #4

Does this strike anyone else as a gimmick? I'm not sure if parsing symbols is really the limiting factor when I try to understand code.

It is no more a gimmick than the standard mode of rendering. However, it does have an adaptation cost. A comparable example: I went to the trouble of creating a custom key binding for my old laptop that was a standard US layout, except the numeral row was symbols by default (i.e. Press shift to get numbers), because I only used the numpad for numerals. It worked, but relearning was too painful. If I'd learned it that way from the beginning, it would just be normal.

Re: Read and understand code faster with programming ligatures in Fira Code font

#19
post #16

I would be very hesitant to use this. It's not "more intuitive" as the author would like to think. In fact , our visual system has been trained to instantly recognize a!=b in code, and I read code a lot more often than Math formulas. Plus code is not math (e.g. 1+(a>0)), confusing = with == will lead to lots of errors etc. If I get used to this font on my machine, i will have a real problem when parsing code in anoth…

I had every one of those concerns too. In spades. And then I actually tried using it for real, and none of the concerns turned out to cause any problem in practice.

(Why would I try using something I was confident would make me less productive? Because I felt was in a rut, and was trying out disruptive changes to my workflow. For example the same day, I switched all my calculator tools to RPN. That's not gone badly either.)

Post reply on HN