Hasklig icon indicating copy to clipboard operation
Hasklig copied to clipboard

More pronounced visual difference between == and ===

Open schlessera opened this issue 8 years ago • 7 comments

In some languages (PHP, JavaScript), there's a big difference between the two following comparison operators:

== : compare if same value === : compare if same value and same type

This makes it important to easily recognize which one you are using.

The current ligatures make the === operator a slightly longer version of the ==, and it is difficult to distinguish them at first glance.

In some other ligature fonts, the === is represented as three horizontal bars, instead of only two. This makes it immediately distinguishable from the standard two bars in ==.

The negated versions of these, != and !==, should get the same treatment.

Here's an example of how this looks in the Firacode font (https://github.com/tonsky/FiraCode): screenshot 2016-07-13 15 33 24

schlessera avatar Jul 13 '16 13:07 schlessera

I have to agree with this - the purpose of the ligatures is to make the text more readable at a glance.

Monoid (https://github.com/larsenwork/monoid) takes the opposite approach to Fira Code, where the equals operators are given more spacing, to make the difference between == and === easily spotted. 1-y2dwpffgj7jtnhjaeto6zg

smbkr avatar Sep 30 '16 09:09 smbkr

Any updates on this?

mistadikay avatar Oct 28 '16 15:10 mistadikay

I'm all for Fira Code's convention here. It's both very obvious (compared to just a somewhat elongated normal equality operator) and also very pleasing to the eye. It should be standard for all these ligature code fonts.

I would use Fira Code, if the alphanumeric characters weren't so ugly. I'm a long-time user of Source Code Pro (mostly Javascript) and thus prefer Hasklig's chars, but the ligatures are currently inferior to Fira Code's.

batjko avatar Nov 09 '16 08:11 batjko

+1 would love to have this, the only thing i want from Fira Code.

huygn avatar Jan 07 '17 17:01 huygn

Yes, the == and === are very similar and having a 3rd bar on === makes it so much clearer!

This would be a very much appreciated improvement.

jonnywilliamson avatar Mar 08 '17 20:03 jonnywilliamson

+1 Kinda hard to know when I'm using === or ==, it does need more difference

killua99 avatar May 24 '17 13:05 killua99

Seems like this repo / font isn't being maintained much anymore. Has anybody found alternative fonts that have this, apart from Fira Code?

batjko avatar Jun 10 '17 15:06 batjko