Earlier quoted context omitted.
Ligatures in your editor don't change the underlying, code they just change the presentation of that code when you're viewing it. While a ligature supporting font may show you ≥, the underlying source file still contains the distinct characters >=
yes "up to a point lord copper". What what happens when this code is copy pasted, moved between machines in different countries or edited in multiple different editors you can get bizarre problems. Even moveing excel between countries gets some very strange changes Eg changing diacritical's but they look very very similar.
Ligatures in Programming Fonts: Hell No
81–89 of 89 posts
Re: Ligatures in Programming Fonts: Hell No
#82Re: Ligatures in Programming Fonts: Hell No
#83Used judiciously, ligatures can help make code more readable, not less. Consider JavaScript's == and ===, and their inverses != and !==. I personally find them difficult to visually distinguish on occasion (especially the negative forms). Fira Code [0] replaces them with two-bar and three-bar equals signs (something like =, ≠, ≡, and ≢, only wider; see the link for a screenshot). I personally find these easier to dis…
For example, if I see "fl" in a string, is that "fl" or is it "fl"? That is, is it the codepoint sequence U+0066 U+006C turned into a ligated version visually, or is it U+FB02 the single codepoint?
Then I get paranoid: Did my text editor Helpfully convert the sequence of characters into the ligature character? The paranoia is probably unjustified, and would be seen as a bug if it weren't (probably), but a clear visual distinction would banish it entirely.
Re: Ligatures in Programming Fonts: Hell No
#84Earlier quoted context omitted.
I'd argue the inverse. In my experience removing the gaps makes some symbols harder to read. Like distinguishing `==` and `===` without gaps is harder, though admittedly three-bar helps. Also, I find the ligatures I've tried a bit of an eye-sore, but that's just personal taste. What's a more serious concern is the "dumbness" mentioned in the article and the handling of ambiguous cases. To give my own example, in addi…
Well it is a matter of personal taste, isn’t it? For me it is just the opposite, the visual appearance of the ligatures burned itself itnto my brain in away that it is easier to spot when it is not there. Sometimes something not converting to a ligature can also be a hint (e.g. for a wrong hyphen beeing used etc)
So what languages actually benefit from this? haskell, clojure but maybe not the usual C family ones?
Re: Ligatures in Programming Fonts: Hell No
#85Fonts like Fira Code are attractive for the same reason animated cursors are attractive - they give people a way to add fun little baubles to their working environment. No, they don't benefit your productivity and in many cases make it worse (e.g. confusing ligatures or buggy editor plugins) but decorations are by definition not of utility.
Re: Ligatures in Programming Fonts: Hell No
#86Used judiciously, ligatures can help make code more readable, not less. Consider JavaScript's == and ===, and their inverses != and !==. I personally find them difficult to visually distinguish on occasion (especially the negative forms). Fira Code [0] replaces them with two-bar and three-bar equals signs (something like =, ≠, ≡, and ≢, only wider; see the link for a screenshot). I personally find these easier to dis…
Re: Ligatures in Programming Fonts: Hell No
#87Earlier quoted context omitted.
Perhaps, but the automatic ligature substitution doesn't know that, and indeed in Times "Kauflete" is rendered with a ligature. Probably because native English speakers aren't used to accent or ligature rules. Anyway, I too agree with the author; if you want ≥ to appear on your screen, it should be in the source text as the UTF-8 bytes for U+2265 and the tooling should understand it. Programming is too fragile to all…
Why would using non-ASCII characters (I assume that is what you mean by Unicode characters) in a git commit message break anything sensible? It's meant to be human readable text, and defaults to UTF-8 (although you can use legacy encodings if you really must). Any git hook processing stuff would just look for stuff it does understand (like '([Cc]lose(s)?|[Ff]ix(es)?) #[0-9]+' or something similar) and ignore the rest…
Re: Ligatures in Programming Fonts: Hell No
#88Earlier quoted context omitted.
Well it is a matter of personal taste, isn’t it? For me it is just the opposite, the visual appearance of the ligatures burned itself itnto my brain in away that it is easier to spot when it is not there. Sometimes something not converting to a ligature can also be a hint (e.g. for a wrong hyphen beeing used etc)
> Sometimes something not converting to a ligature can also be a hint (e.g. for a wrong hyphen beeing used etc) So what languages actually benefit from this? haskell, clojure but maybe not the usual C family ones?
Re: Ligatures in Programming Fonts: Hell No
#89Is Personally, I'd love a keyboard that had a ≤ key and a programming language that recognized that symbol.
say 4 ≤ 5; # True
say 4 ≤ 4; # True
say 4 ≤ 3; # False
say 4
Specifically they are the exact same subroutine.
(The normal operators are just subroutines with a special name.) say &infix:« ≤ » =:= &infix:«
(The =:= operator is basically the same as pointer equivalence.)The line which creates this equivalence is the following:
my constant &infix: := &infix:«
https://github.com/rakudo/rakudo/blob/b0dd44b006dc44da5695b2...