Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do we need Enum::Case type? #33

Closed
iluuu1994 opened this issue Dec 4, 2020 · 3 comments
Closed

Do we need Enum::Case type? #33

iluuu1994 opened this issue Dec 4, 2020 · 3 comments
Milestone

Comments

@iluuu1994
Copy link
Collaborator

$a instanceof Suit::Spades; // true

I'm not entirely sure we really need support for the type Enum::Case at this point because it's equivalent to ===. It's only potentially useful when you want to call methods in some other context without checking/asserting the case first.

@iluuu1994 iluuu1994 added this to the Enums milestone Dec 4, 2020
@Crell
Copy link
Owner

Crell commented Dec 4, 2020

Possibly not. I listed that mainly because I expected it would fall out anyway, and to demonstrate that it's a subclass. Does it not "just work"?

@iluuu1994
Copy link
Collaborator Author

Not completely automatic but probably easy. I feel like this part could be a tiny bit controversial. We can also leave it in and I'll see how easy it is to implement.

@iluuu1994
Copy link
Collaborator Author

This is irrelevant now.

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

No branches or pull requests

2 participants