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

Inconsistent pattern for passing tandem to constructor #179

Closed
pixelzoom opened this issue Sep 14, 2021 · 1 comment
Closed

Inconsistent pattern for passing tandem to constructor #179

pixelzoom opened this issue Sep 14, 2021 · 1 comment

Comments

@pixelzoom
Copy link
Contributor

Related to #154

tandem is handled inconsistently in constructors. Sometimes it's an option, sometimes it's a required constructor parameter.

The pattern that I prefer is to use options, with default value tandem: Tandem.REQUIRED. Since just about everything eventually may need a tandem, using options prevents clutter in the constructor signature.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Sep 14, 2021

Actually, the sim is quite consistent in how it passes tandem -- in all but one case (FocalPoint), it passes via a constructor parameter. This is not how I would have done it, but it's a legitimate alternative, and probably not worth changing at this point. So in the above commit, I just changed FocalPoint to match the pattern used elsewhere.

Closing.

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

No branches or pull requests

1 participant