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

Erase the erase function #1460

Merged
merged 3 commits into from
Aug 24, 2023
Merged

Erase the erase function #1460

merged 3 commits into from
Aug 24, 2023

Conversation

xsebek
Copy link
Member

@xsebek xsebek commented Aug 23, 2023

  • simplify the erase function using the Functor instance

@xsebek xsebek requested a review from byorgey August 23, 2023 20:18
Copy link
Member

@byorgey byorgey left a comment

Choose a reason for hiding this comment

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

🤯

@byorgey
Copy link
Member

byorgey commented Aug 23, 2023

Wait, actually, now I am having second thoughts, is this new implementation really equivalent to the old one?

Edited: ah, I think I see now. It is actually not equivalent, but not in a way that is important. The old erase got rid of type annotations AND source location annotations. void just gets rid of type annotations but doesn't touch the source locations. So actually void is probably better. 😄

@xsebek
Copy link
Member Author

xsebek commented Aug 23, 2023

@byorgey it passes tests, so I think it's pretty equivalent (up to our test coverage). 😄

I have been using void occasionally when I needed to get rid of the types and did not know about erase.

Is there is a reason for dropping SrcLoc?

@byorgey
Copy link
Member

byorgey commented Aug 23, 2023

Is there is a reason for dropping SrcLoc?

No, there's not, which is why I think void is better!

@xsebek xsebek added the merge me Trigger the merge process of the Pull request. label Aug 24, 2023
@mergify mergify bot merged commit e57c60b into main Aug 24, 2023
9 checks passed
@mergify mergify bot deleted the erased branch August 24, 2023 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Trigger the merge process of the Pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants