FiraCode icon indicating copy to clipboard operation
FiraCode copied to clipboard

Add ligatures for logical and && and or ||

Open theking2 opened this issue 5 years ago • 8 comments

Boolean operators && to U+2227 thus ∧ || to U+2228 thus ∨ ^^ to U+22BB thus ⊻ or U+2295 thus ⊕

a rational reason for this would be to distinguish between boolean and bitwise operators (& vs &&, | vs ||) which would greatly help the careless programmer

theking2 avatar Nov 18 '20 19:11 theking2

I think I tried this (or at least it was discussed) and in general people agreed it was a bad idea. But now that we have stylistic sets, I can make it optional.

What’s ^^? Never seen it. Which languages is it used in?

tonsky avatar Nov 18 '20 19:11 tonsky

Thanks. You are absolute right on the xor - boolean operator, there are bitwise xor (^) operators in many languages but a boolean xor would be a !=

sorry about that

theking2 avatar Nov 18 '20 19:11 theking2

IIRC Scala's Boolean type supports &&, || and ^^ as aliases for &, | and ^

Get Outlook for Androidhttps://aka.ms/ghei36


From: theking2 [email protected] Sent: Wednesday, November 18, 2020 8:26:04 PM To: tonsky/FiraCode [email protected] Cc: Subscribed [email protected] Subject: Re: [tonsky/FiraCode] Add ligatures for logical and && and or || (#1159)

Thanks. You are absolute right on the xor - boolean operator, there are bitwise xor (^) operators in many languages but a boolean xor would be a !=

sorry about that

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftonsky%2FFiraCode%2Fissues%2F1159%23issuecomment-729901790&data=04%7C01%7C%7Cf9b0f55c29344db58edf08d88bf7cb3f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637413243661649349%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=kbZjUQpsUHMHuEPgbty1G3NB8CAmhIfrMs%2FT6ke4PSI%3D&reserved=0, or unsubscribehttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMRJI3HSHWYY2TQ55PE3AQLSQQNUZANCNFSM4T2MQFOQ&data=04%7C01%7C%7Cf9b0f55c29344db58edf08d88bf7cb3f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637413243661649349%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=CHzvu4XY%2BHktpM0O6sUvAyF92ZH58gK04y9h%2Bblu%2F1U%3D&reserved=0.

RubenVerg avatar Nov 18 '20 19:11 RubenVerg

Awesome would be a U+00AC (¬) for a ! but as it is not a ligature it won't work.

theking2 avatar Nov 18 '20 19:11 theking2

In addition, but...who hopes "Congratulations!" turns into "Congratulations¬"?

yvvt0379 avatar Jul 21 '21 06:07 yvvt0379

Many languages use the double & & or || for boolean operators. C, C++, C#, PHP, if I'm not mistaken Java, Javascript

theking2 avatar Nov 13 '21 22:11 theking2

This did get abandoned or ignored, didn't it?

theking2 avatar Nov 20 '21 22:11 theking2

Might be in v7 as a stylistic set

tonsky avatar Nov 21 '21 00:11 tonsky