Skip to content

reword warning about equals and cooperative equality#9320

Merged
SethTisue merged 1 commit intoscala:2.13.xfrom
SethTisue:adjust-pr-8120-message
Nov 19, 2020
Merged

reword warning about equals and cooperative equality#9320
SethTisue merged 1 commit intoscala:2.13.xfrom
SethTisue:adjust-pr-8120-message

Conversation

@SethTisue
Copy link
Member

@SethTisue SethTisue commented Nov 18, 2020

this is a small adjustment to @eed3si9n's #8120

it's no big deal, but the old wording kind of made cooperative equality sound like what we need rescuing from, rather than what will rescue us

Copy link
Contributor

@som-snytt som-snytt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uses uncooperative equality

Uncooperative equality describes the state of democracy in the US.

@SethTisue SethTisue requested a review from eed3si9n November 18, 2020 04:02
def typesString = "" + normalizeAll(qual.tpe.widen) + " and " + normalizeAll(other.tpe.widen)
def nonSensiblyEquals() = {
refchecksWarning(pos, s"comparing values of types $typesString using `${name.decode}` is unsafe due to cooperative equality; use `==` instead", WarningCategory.OtherNonCooperativeEquals)
refchecksWarning(pos, s"comparing values of types $typesString using `${name.decode}` unsafely bypasses cooperative equality; use `==` instead", WarningCategory.OtherNonCooperativeEquals)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine by me, but I guess my ideal is == become the symbolic alias of equals and we take down the patriarchy of so-called cooperative equality. A system that is closed to the participation of user-land extension, like UInt type by Spire, directly goes against the philosophy of growable language, which Scala is named after.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's seize the moment to rename the language to Growa. Then you can say, Grow a UInt. And the t-shirt can read, Grow a Pair.

@eed3si9n
Copy link
Member

it's no big deal, but the old wording kind of made cooperative equality sound like what we need rescuing from, rather than what will rescue us

You read it right. The crony capitalism is corrupt. We need equal protection under eq law - https://eed3si9n.com/equal-protection-under-eq-law

@SethTisue
Copy link
Member Author

SethTisue commented Nov 18, 2020

ah, now your efforts to radicalize Scala users through propagandistic warning messages are exposed! nice try, troublemaker!! 💣

@SethTisue SethTisue merged commit 9ca5a45 into scala:2.13.x Nov 19, 2020
@SethTisue SethTisue deleted the adjust-pr-8120-message branch November 19, 2020 17:10
hamzaremmal pushed a commit to hamzaremmal/scala3 that referenced this pull request May 2, 2025
…sage

reword warning about `equals` and cooperative equality
hamzaremmal pushed a commit to scala/scala3 that referenced this pull request May 7, 2025
…sage

reword warning about `equals` and cooperative equality
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants