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

added type assertion example #567

Merged
merged 2 commits into from
Jan 6, 2025
Merged

added type assertion example #567

merged 2 commits into from
Jan 6, 2025

Conversation

kevin-kho
Copy link
Contributor

addresses issue #523

Copy link
Collaborator

@eliben eliben left a comment

Choose a reason for hiding this comment

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

Thanks for the PR.

I would simplify it more. We don't need the circum method.

I'd just create a function called something like detectCircle that takes a geometry and prints out its radius it's a cirlce. The comment should clarify that this is done if we want to explicitly check the runtime type of the value; the comment should also point to the switch example for an alternative approach.

@kevin-kho
Copy link
Contributor Author

Thanks for the PR.

I would simplify it more. We don't need the circum method.

I'd just create a function called something like detectCircle that takes a geometry and prints out its radius it's a cirlce. The comment should clarify that this is done if we want to explicitly check the runtime type of the value; the comment should also point to the switch example for an alternative approach.

addressed in commit 6d59536

Copy link
Collaborator

@eliben eliben left a comment

Choose a reason for hiding this comment

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

Thank you - this is close enough to what I want that I'll go ahead and merge it. I'll tweak it a bit before republishing

@eliben eliben merged commit 858d475 into mmcgrana:master Jan 6, 2025
2 checks passed
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