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

exercises(space-age): overhaul to use enum #435

Merged
merged 1 commit into from
Jan 11, 2023

Conversation

ee7
Copy link
Member

@ee7 ee7 commented Oct 29, 2022

Closes: #405

@ee7 ee7 requested a review from ynfle October 29, 2022 15:34
Copy link
Contributor

@ynfle ynfle left a comment

Choose a reason for hiding this comment

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

Non-blocking suggestion: Perhaps we keep string and use it to teach parseEnum and to check if it's one of them

@ee7
Copy link
Member Author

ee7 commented Jan 11, 2023

Mmm. Interesting idea, but I'll keep enum here. I think that:

  • the concept of "planets in the solar system" is best represented by an enum
  • more type safety is better
  • specifically teaching parseEnum is probably better left for a targeted concept exercise
  • using enum here gives a better opportunity to practice enum-indexed arrays.

@ee7 ee7 merged commit b770d96 into exercism:main Jan 11, 2023
@ee7 ee7 deleted the overhaul-space-age branch January 11, 2023 11:21
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.

exercises(space-age): overhaul to use enum
2 participants