Skip to content

feat: comparison operators for roles#422

Open
Droid00000 wants to merge 1 commit into
shardlab:mainfrom
Droid00000:feat/comparable-roles
Open

feat: comparison operators for roles#422
Droid00000 wants to merge 1 commit into
shardlab:mainfrom
Droid00000:feat/comparable-roles

Conversation

@Droid00000
Copy link
Copy Markdown
Collaborator

Summary

This PR adds the >, <, <=,>=, and <=> operators for comparing roles via their position in the hierarchy. I understand this may be an unwanted change, but it makes comparing roles by their position a lot easier. Other libraries implement similar interfaces too. Additionally, by implementing the Darth Vader ship operator <=>, calling #sort on an Array<Role> now behaves correctly.

Added

Role#>
Role#<
Role#<=
Role#>=
Role#between?

@Droid00000 Droid00000 force-pushed the feat/comparable-roles branch from 662660b to 13b4bad Compare January 19, 2026 04:24
@Droid00000 Droid00000 force-pushed the feat/comparable-roles branch 5 times, most recently from d037d17 to 52aaa13 Compare March 18, 2026 01:20
@swarley
Copy link
Copy Markdown
Member

swarley commented Mar 18, 2026

This one is a little fancy, let me stew on it a bit longer

@Droid00000 Droid00000 force-pushed the feat/comparable-roles branch from 74bfbb9 to 9c0859b Compare April 12, 2026 21:25
@Droid00000 Droid00000 force-pushed the feat/comparable-roles branch from 9d2a1e5 to aeba3ae Compare May 17, 2026 06:38
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.

2 participants