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

Pass either ListFilters struct or its properties individually as parameters to api functions #282

Open
ShubhranshuSanjeev opened this issue Nov 13, 2024 · 0 comments

Comments

@ShubhranshuSanjeev
Copy link
Collaborator

Can we either pass ListFilters struct or its properties individually as parameters to all these api functions. I would prefer individual parameters but I am okay with anything as long as it is consistent.

Why I prefer individual parameters?
As we won't have to construct a dummy ListFilters struct instance to pass the values which is being done at some places, I can directly write 0 or true, etc, and also removes the baggage of cloning if we want to reuse the values, as these primitive types implement Copy and its also cheap (not really a deal breaker).

Removing the baggage of cloning a dummy struct instance just because we want to reuse the values is a deal breaker for me.
https://github.com/juspay/superposition/pull/209/files#diff-e4e1d9e001dbf707cd00c7d34f98e60a017d96fd2be2230a10e5e625307819b4R46-R54

Originally posted by @ShubhranshuSanjeev in #209 (comment)

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

No branches or pull requests

1 participant