Replies: 1 comment 2 replies
-
I don’t see anything wrong there. It’s actually a best practice to conditionally use(someOtherCapsule) when you only need it some of the time. the same is not true for use.foobar (side effects)—they must always be called unconditionally due to the implementation. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Would you advice against this conditional
use
knowing that the condition is assured to be always the same (immutable)? Is the second time I do like this. I know I could "use" it in a not conditional way, but then the object will be created even when it's not needed.Beta Was this translation helpful? Give feedback.
All reactions