6 ms·
Ligatures, IMO, make for a bad coding editor experience. No, I do not want >> parsed as a right shift when it's actually used as two adjacent template delimiter
by _eojb 3y ago
Ligatures, IMO, make for a bad coding editor experience. No, I do not want >> parsed as a right shift when it's actually used as two adjacent template delimiters. And no, I'm not okay with the inconsistency that results from the usage of different operators from one programming language to another. Want to change a != to a == operator? Enjoy futzing with placing the cursor properly. It's a cute idea, but I found it more annoying to use in practice.
- jnrk 3y agoI agree. I respect that people use it, but it's really not for me. It makes the code harder to read IMO
- kevincox 3y agoExactly. Personally I like to have it very obvious exactly what characters are in my file. But I also do agree that it looks very nice and can appreciate why people prefer it.
- coffeebeqn 3y agoTo each their own. I have never found them confusing or annoying in a half a dozen languages. If it doesn’t improve readability for your brain then definitely turn them off. In a language like Go or JS there aren’t very many operators so it’s not as bad as C might be. Still a great font without ligatures
- deleted 3y ago[deleted]
- marcos100 3y agoAgree, but for me, maybe because I'm so used to not having them that, when I see it, it grabs too much attention. It doesn't feels right.
- urxvtcd 3y agoYou can always use the original version without ligatures, Fira Mono, available here: https://fonts.google.com/specimen/Fira+Mono https://fonts.google.com/specimen/Fira+Mono
- vladvasiliu 3y ago> No, I do not want >> parsed as a right shift when it's actually used as two adjacent template delimiters. I don't like ligatures either, but I think that this depends on the editor. For example, if typing Rust in IntelliJ, if you type `Box<Box<String>>`, it will show two regular ">" characters. But if you type `x >= 3`, it will replace it with a single glyph. https://ibb.co/Dzx0LFG https://ibb.co/Dzx0LFG
- deleted 3y ago[deleted]
- mort96 3y agoHow about 'x >> 3'? I would be very surprised if the editor enabled and disabled ligatures in sections of code based on information from a proper parser...
- vladvasiliu 3y agoI don't think it actually does anything useful with >> I've tried both Fira Mono and Jetbrains Mono, it seems to barely get the two glyphs closers. Below are screen captures of Jetbrains Mono. With ligatures: https://ibb.co/vQ3nCsd https://ibb.co/vQ3nCsd without ligatures: https://ibb.co/DtD1P9X https://ibb.co/DtD1P9X But, to your point, it would seem it doesn't enable ligatures based on the parser, since there is a difference between ligatures active and disabled, and it applies on both lines.
- Joeri 3y agoI love it, wouldn’t want to program without it. The small quirks in editing are vastly outweighed by the improved readability of the code. Luckily we can each have our own way and still work on the same code.
- lost_tourist 3y ago"outweighed" or "vastly outweighed" ?
- qorrect 3y agoI 'like' it, I find it easier to read. But I would be ok without them, it's a minor improvement for me.
- nocontextpls 3y ago[dead]
- deleted 3y ago[deleted]
- Culonavirus 3y ago> It's a cute idea, but I found it more annoying to use in practice. Agreed. Looks very nice in editor, but programming is not about looks. It's about ease of editing and maintainability.
- matwood 3y ago> It's about ease of editing and maintainability. What if ligatures makes it easier to edit and maintain? I assume you only use light mode and the system fixed font for your programming?
- recursive 3y agoNot who you asked, but I use dark mode in VS Code and Sublime usually. But those are the defaults. I do use default fonts. I generally don't change defaults. However. If ligatures were turned on by default, I would turn them off.
- worksonmine 3y agoLigatures seem like the light theme in your analogy. I do NOT want my code looking one way in the editor, and another when reading PRs on the web. Consistency is king, and this just feels like bells and whistles some designer came up with. Same reason one uses spaces over tabs, except in Makefiles because someone decided tabs are mandatory. With spaces copying the code from one place to another doesn't change the indentation too much. I'm sure I would get used to it after a while, but right now I'm having trouble even reading the examples. I don't need my editor to be too special.
- WorldMaker 3y ago> I do NOT want my code looking one way in the editor, and another when reading PRs on the web. Some PR tools let you select your font. I think more should. For one example on the web today, you can use github.dev (shortcut '.' on the github.com page for the PR) to open GitHub PRs in the web version of VS Code, which will Settings Sync, including font choice, with your regular VS Code profile. (Though, of course, that uses the GitHub Issues and Pull Requests extension to provide PR tools, and you can also just install that same extension locally into VS Code and never visit the web in the first place and just use VS Code for PR reviews if you like.)
- reocha 3y agoJust configure your editor to disable ligatures in template files.
- packetlost 3y agoIdk, my editor/terminal disables the ligatures when my cursor hovers over them, so that's not a problem. It's absolutely a personal preference thing, and I personally prefer it. At least for the languages that I typically work with. I could see it being annoying with certain languages.
- ChrisArchitect 3y agoFira Code NL: fork that removes ligatures https://news.ycombinator.com/item?id=34809593 https://news.ycombinator.com/item?id=34809593
- mort96 3y agoYour editor probably also has an option to disable ligatures, so you may want to look into that if you like Fira Code but don't like the ligatures.
- vxNsr 3y agoMy biggest problem is that despite them supposedly being supported by windows 10 I can never get it to work correctly even on totally fresh installs. I’m 0 for 5 at this point. If someone has the magic that actually fixes this, please share. (And yes I enabled utf-8). Also kinda meta but I see three different font related links on the homepage right now? Just coincidence?
- tracker1 3y agoIt's often a separate configuration option in various editors... I know you have to enable it explicitly in VS Code, for example. It's not on in applications by default.
- mort96 3y agoI never found it hard to edit code with ligatures when I used them. I don't use them anymore, but I don't understand some people's need to shout about how bad they are. Don't use them if you don't like them, use them if you like them, simple as that.
- tracker1 3y agoYou can generally configure that in your viewer/editor on if to use ligatures or not, separately from the font itself... but if it isn't in the typeface, you don't even get the option if you do want it.
- snthpy 3y agoTotally agree. What are some nice monospace programming nerdfonts without ligatures?
- jansan 3y agoOn https://www.nerdfonts.com/font-downloads https://www.nerdfonts.com/font-downloads you can see if ligatures are supported by looking at the => in the preview.
- veidr 3y agoThey're definitely polarizing, in the sense that some people intensely dislike them and never use them, others love them and always use them. It reminds me of the debates about font antialiasing back in the 1990s. A vocal minority of programmers then insisted that font antialiasing wasn't suitable for coding, as a pixel-oriented monospace font (e.g. Monaco at 9 points) provided better text density and better readability[1]. Then, like now, I could see the validity of the arguments of both sides. Readability is a highly subjective thing (and also varies over time, even for the same person). And the screens and antialiasing algorithms of the day weren't as sophisticated as what we now enjoy. Personally I waffled on it for a while, but now I always code with ligatures enabled in my main work (which is predominantly using TypeScript and Rust, so the default ligatures of these fonts make sense). I suspect that the majority opinion will shift to using ligatures for coding (if it hasn't already) once that is the default experience of most editors with the default fonts, and it becomes something you have to turn off, rather than turn on. [1]: This is an example of Monaco, although what they show as 12 point is how I remember 9-point looking... not sure if my memory is faulty or what, though, it was a long time ago. https://www.fontriver.com/font/monaco/ https://www.fontriver.com/font/monaco/