Firacode: Add ---> ligature

Created on 1 Aug 2016  路  5Comments  路  Source: tonsky/FiraCode

You can get the ---> as a combination of -- and ->; would be nice if there was a ligature for it and if it was somehow different from the -> ligature.

suggestion

Most helpful comment

@nesteruk Those are two different operations, and I don't think it makes any sense to combine them. After all, the whole point of ligatures is to convert two-character sequences that have a single meaning to a single token that our brain has to process. If foo--->whatever() was converted to one long arrow, your brain would have to actively *disassemble" it into the -- and -> operators, which is counter-productive to the goal of ligatures.

All 5 comments

Can you provide an example of how this could've happen?

Let's say you have a class Foo implementing operator-- that returns a Bar& and then you have a Bar that has operator ->. Thus, you can write foo--->whatever();.

@nesteruk Those are two different operations, and I don't think it makes any sense to combine them. After all, the whole point of ligatures is to convert two-character sequences that have a single meaning to a single token that our brain has to process. If foo--->whatever() was converted to one long arrow, your brain would have to actively *disassemble" it into the -- and -> operators, which is counter-productive to the goal of ligatures.

Sorry for my two cents, but I honestly think this is really a silly idea to want it for c++. I mean I could understand if you want it for another programming language that has the ---> token, but not for c++.

Yeah, if that鈥檚 two different operations we don鈥檛 want to have them as a single ligature. It鈥檒l be against the font goals

Was this page helpful?
0 / 5 - 0 ratings

Related issues

whatisaphone picture whatisaphone  路  3Comments

pamu picture pamu  路  3Comments

miniBill picture miniBill  路  4Comments

hatched picture hatched  路  3Comments

aolko picture aolko  路  3Comments