-
-
Notifications
You must be signed in to change notification settings - Fork 245
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
Better enum symbol casting documentation #706
Better enum symbol casting documentation #706
Conversation
✅ Deploy Preview for crystal-book ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
I think we should keep the old "Usage" section and add a new section for the symbol-enum autocasting. With the removal of the old example it is no longer clear how to use enums with a case statement. Especially this part that got removed provided helpful information:
|
I could add an example like:
But I think that should be an additional example, not included in the I don't think the sections you quoted relate to how to use a case statement, but to the benefits of using enums over symbols. Maybe it could fit but honestly don't know if it does tonally. Maybe it could be something like:
|
I think it's fine like this. The paragraph mentioned in #706 (comment) is not very relevant for the enum page. |
Co-authored-by: Johannes Müller <[email protected]>
Co-authored-by: Johannes Müller <[email protected]>
Co-authored-by: Johannes Müller <[email protected]>
Closes #705