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

Consider making dataclasses in the API keyword-only #76

Closed
wwwillchen opened this issue Mar 19, 2024 · 1 comment · Fixed by #80
Closed

Consider making dataclasses in the API keyword-only #76

wwwillchen opened this issue Mar 19, 2024 · 1 comment · Fixed by #80

Comments

@wwwillchen
Copy link
Collaborator

@wwwillchen
Copy link
Collaborator Author

I think it's good to do this now while usage of Mesop is relatively limited. I think the two main reasons for doing keyword-only is:

  1. it makes it easier to evolve the API (otherwise, we'll need to be careful of only appending new attributes to the bottom of the dataclass definition)
  2. it encourages, IMO, cleaner code at the call-sites as it's more explicit than passing by position

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 a pull request may close this issue.

1 participant