Skip to content

Conversation

@esainane
Copy link

@esainane esainane commented Dec 4, 2019

Once is enough to coerce to a boolean, twice is superfluous for a
simple equality test.

This builds from #720

Offline users have a nil isAdmin, non-admins have a false isAdmin.

This caused comparisons to often enter the admin branch prematurely,
breaking alphabetical etc ordering.
Once is enough to coerce to a boolean, twice is superfluous for a
simple equality test.
@esainane esainane changed the title Userlistpanel: not not, not not Userlistpanel: not, not not not Dec 4, 2019
@DieGoldeneEnte
Copy link

FYI: This pull-request has the commit from your "sorting"-pull-requests.

@sprunk
Copy link
Member

sprunk commented Dec 4, 2019

@sprunk
Copy link
Member

sprunk commented Dec 4, 2019

I think I'd prefer sticking to not not for being the idiomatic cast to bool, just one not is typically used for actual negation so would be a bit more confusing. This is a weak preference so if anybody else wants to merge then feel free to.

@Anarchid
Copy link
Member

Anarchid commented Dec 4, 2019

I also prefer keeping the not not.

@GoogleFrog GoogleFrog closed this Feb 10, 2020
@GoogleFrog
Copy link

Conflicts, and I prefer not not as a cast to bool.

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.

5 participants