Closed Luisav1 closed 1 year ago
I feel the same way here as I do in https://github.com/phetsims/build-a-nucleus/issues/152#issuecomment-1684419690:
This is a reasonable thought, but I kinda think it is more trouble than it is worth. Much of the worry in regards to "only pass in what you need" is for class constructors, where by passing in a whole model class, you are more likely to use other stuff that further breaks encapsulation and muddy the exact purpose of your class. Here, it seems totally fine to provide a particleAtom to a function for extracting one of its particles.
Especially because here it means passing in two items instead of the one ParticleAtom.
Let me know if you'd like to discuss more.
@Luisav1 and I discussed and are in agreement.
From #112. Currently passing in entire atom.