ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
This is like the difference between an executable and a library. Typically things like command line parsing are not shareable between nodes. If they are, you can make a module and share it. But otherwise there's no need to expose the non-reusuable code.
As stated our goal is to encourage reuse, and minimizing dependency creep is a very good way to do that. For reusability the code needs to stay clean and separated. In languages like python it's easy to start to write spaghetti code which does not have an understandable structure. It is actually harder to reuse code if the resuable parts are mixed with the non-reusable parts, as an external developer might try to reuse the parts that are not designed to be reused etc. The separation makes a clear distinction as to where to look for reusable bits.