You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 3, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 3, 2025. It is now read-only.
Wildcard suggestion - new ==== and >=== operators #48
What's wrong with overloading == and !=? If you can change what that operator does, its current behavior isn't going to be a problem. The ==== operator you propose, apart from being excessively long, makes the impression of being more strict than ===, which would be very misleading if you overload it to be less strict.
Reacted by Jordan Harband, DIES, Yaroslav Vorobev, Josh Di Fabio, Matthias Kunnen, Grant Gryczan, Ashlynne Mitchell, Ricardo Fernández Serrata, Jo Colina, extremeheat and 2 more
The issue with using the existing operator isn't its behaviour when overloaded - it's its behaviour with existing types (the issues here are well known).
Point taken on the potentially misleading impression though. Not sure what to suggest there, not enough symbols on the keyboard...
Activity
cshaa commentedon Aug 13, 2021
What's wrong with overloading
==and!=? If you can change what that operator does, its current behavior isn't going to be a problem. The====operator you propose, apart from being excessively long, makes the impression of being more strict than===, which would be very misleading if you overload it to be less strict.suspiciousfellow commentedon Aug 18, 2021
The issue with using the existing operator isn't its behaviour when overloaded - it's its behaviour with existing types (the issues here are well known).
Point taken on the potentially misleading impression though. Not sure what to suggest there, not enough symbols on the keyboard...
Rudxain commentedon Jul 24, 2022
Maybe
=@=,=#=,=$=,=?=? The rationale behind using a special symbol between the=s is to avoid ambiguity with assignment ops