I am currently working on a problem that has a central controller that is handling inputs and outputs between various modules and maintaining a number of entity classes as these change. When working with getters and setters I can either provide raw values or I can provide one of the entity classes, and I'm curious how this affects coupling. I am working in C++, but I'm curious the way other languages view this.
For example, I can say
object.set_position_and_orientation(double latitude, double longitude, double altitude, double pitch, double roll, double yaw)
or I can say
Obviously, sharing this object state is requiring another header in this other module, so I can see it as increasing coupling and complexity; but on the other hand I am defining an interface between these classes through this other entity class.
The answer that we eventually set on is this is a limitation of C++ to have a defined interface, and we settled on including this class that serves as the interface. I'm not satisfied with this answer, but I could not find a definitive "best" way to do it.