4 ms·
This seems fairly cool, and I appreciate the write up, but god I hate it so much when people write code samples that try and be fancy and use non-code-character
by wedn3sday 5y ago
This seems fairly cool, and I appreciate the write up, but god I hate it so much when people write code samples that try and be fancy and use non-code-characters in their code samples. Clarity is much more important then aesthetics when it comes to code examples, if Im trying to understand something I've never seen before, having a bunch of extra non-existant symbols does not help.
- DHowett 5y agoI’m guessing that you are referring to the “coding ligatures” in the author’s font selection for code blocks? You can likely configure your user agent to ignore site-specified fonts.
- asiachick 5y agoAgreed. I use them in my editor but I ban them from my blog posts. They aren't helpful to others
- Rebelgecko 5y agoWhich characters, the funky '≠'? I've seen those pop up a few other times recently, which makes me wonder if there's some editor extension that just came out that maps != and !==
- roywiggins 5y agoThey're ligatures. https://github.com/tonsky/FiraCode https://github.com/tonsky/FiraCode
- loh 5y agoAre you referring to the `!==` and `=>` in their code being converted to what appears to be a single symbol? Upon further inspection, it looks like the actual code on the page is `!==` and `=>` but the font ("Fira Code") seems to be somehow converting those sequences of characters into a single symbol, which is actually still the same number of characters but joined to appear as a single one. I had no idea fonts could do that.
- red_trumpet 5y agoThat's called a ligature[1], and clasically used for joining for example ff or fi into more readable symbols. [1] https://en.wikipedia.org/wiki/Ligature_(writing) https://en.wikipedia.org/wiki/Ligature_(writing)