tonsky / FiraCode

Free monospaced font with programming ligatures
SIL Open Font License 1.1
77.26k stars 3.1k forks source link

Add ligatures for logical and && and or || #1159

Open theking2 opened 3 years ago

theking2 commented 3 years ago

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

tonsky commented 3 years ago

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?

theking2 commented 3 years ago

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

RubenVerg commented 3 years ago

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

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


From: theking2 notifications@github.com Sent: Wednesday, November 18, 2020 8:26:04 PM To: tonsky/FiraCode FiraCode@noreply.github.com Cc: Subscribed subscribed@noreply.github.com 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.

theking2 commented 3 years ago

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

yvvt0379 commented 3 years ago

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

theking2 commented 2 years ago

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

theking2 commented 2 years ago

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

tonsky commented 2 years ago

Might be in v7 as a stylistic set