-
Notifications
You must be signed in to change notification settings - Fork 6
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
Should tandem be in options or required param? #489
Comments
Three concerns: (1) Having (2) In general, anything that has a reasonable default is typically passed via options. (3) One way of providing |
(4) Having tandem as a required parameter makes it unnecessarily complicated to test in the browser console. E.g. the case I ran into while debugging/testing yesterday:
vs.
All code should be testable without tandems. |
I've changed my opinion since #489 (comment). I tried a few different approaches when instrumenting Hooke's Law. The approach that worked the best for instrumenting sim-specific code was to: (1) Use (2) Use option I haven't instrumented any common code yet. But I suspect the tandem is best passed via options, with default |
The description in #489 (comment) sounds great to me, should we capture it in the "how to instrument" documentation and close this issue? |
will be handled as part of https://github.com/phetsims/phet-io/issues/1243. Closing |
For joist, @samreid and I have implemented tandems as required parameters. @pixelzoom in #487 pointed out that he wished that they were in options. I'm not just I see the benefit in moving these to options in joist. @pixelzoom what were your concerns?
The text was updated successfully, but these errors were encountered: