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

document how match_expected is different from same_as #166

Open
mimoo opened this issue Aug 23, 2024 · 2 comments
Open

document how match_expected is different from same_as #166

mimoo opened this issue Aug 23, 2024 · 2 comments
Labels

Comments

@mimoo
Copy link
Contributor

mimoo commented Aug 23, 2024

we have two functions:

  • match_expected
  • same_as

and they seem to be doing the same thing, almost. There's no documentation and I don't remember why I wrote them like this. It would be helpful if someone can investigate why we have two functions here, and either merge them into one or document why we need two different functions

@ronantakizawa
Copy link
Contributor

ronantakizawa commented Aug 25, 2024

Hi @mimoo , this is my first issue on Noname so I may have some misunderstandings about the code.

From my understanding these are the differences:

match_expected: Allows for flexible matching between types, meaning it considers types equivalent in certain contexts, such as treating BigInt as equivalent to Field.

same_as: Requires an exact match between types, ensuring that two types are completely identical.

Should I try and use one of the 2 functions, or add docs that explains the difference?

@mimoo
Copy link
Contributor Author

mimoo commented Aug 26, 2024

Hey! So what we're wondering is how is that difference used? Why is one called over another? (Like who calls the first one, who calls the second one)

Especially after this PR: #164

I think a PR merging both of the functionality with some documentation and a new argument flag that allows switching between the two behaviors would be nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants