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

Simplify pattern matching tests #172

Merged
merged 1 commit into from
Oct 2, 2023

Conversation

waiting-for-dev
Copy link
Member

Instead of showcasing different ways that pattern matching can be used on Ruby, just test what is specific to our implementation and remove the indirection in testing.

Instead of showcasing different ways that pattern matching can
be used on Ruby, just test what is specific to our implementation and
remove the indirection in testing.
@waiting-for-dev waiting-for-dev force-pushed the waiting-for-dev/patter_match_tests branch from 2f01b5f to cb5460d Compare October 2, 2023 10:47
@flash-gordon
Copy link
Member

The point of these tests is not to test Ruby but to showcase using PM in your own code. Even though they were written back when PM was an experimental feature keeping them doesn't cost much so I'd leave them for those who poke around (myself included :).

@waiting-for-dev
Copy link
Member Author

Thanks for clarifying @flash-gordon. As someone who took the first look at understanding how PM was implemented in dry-monads, those tests were a bit confusing to understand. Do you think those kinds of examples would have a better fit in the docs instead? 🤔

@flash-gordon
Copy link
Member

I agree on this, I was a but worried some changes in the lib (or in the lang) can break backward compatibility in special cases. I both explored the syntax and documented supported usages this way and made sure the lib doesn't break. At this point I think we can agree PM endured the test of time so these tests can be removed. It's for sure not a thing to have a lot of discussions about, I just explained my reasoning.

@flash-gordon flash-gordon merged commit 96e93c0 into main Oct 2, 2023
10 checks passed
@flash-gordon flash-gordon deleted the waiting-for-dev/patter_match_tests branch October 2, 2023 15:14
@waiting-for-dev
Copy link
Member Author

Thanks for your understanding, @flash-gordon ❤️

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