compiler icon indicating copy to clipboard operation
compiler copied to clipboard

⚡️ Replace equality operator with call to a custom structural equality function.

Open hayleigh-dot-dev opened this issue 4 years ago • 0 comments

Right now we use the JS equality operator, but for a language like Ren (or really, most languages), what we often want is structural equality:

{ foo: 1 } == { foo: 1 }

This should always be true. JS uses referential equality which can be a helpful equality short-circuit but it definitely shouldn't be our default!

The same applies to inequality checks too.

hayleigh-dot-dev avatar Jul 12 '21 20:07 hayleigh-dot-dev