Is "smash together" a good phrase for
Solution 1:
“Smash together” implies some violence in the process. For softer alternatives, I would go with merge (simpler is often better), amalgamate, conflate, consolidate, blend, or integrate.
Solution 2:
Smash together only works if the combining bodies are moving at high speed and collide.
When things are created from smashing together, such as in your quasar example, then the original bodies are combined into a new one and some matter and energy are transferred away from the resulting body in the process. However some of the original matter and energy remain.
Since this is for programming then I imagine you are combining data structures. If we assume that, because you want to smash them together, this means that some data is lost when you combine your structures then the following phrases might be applicable.
Lossily compress
Selectively [join, combine, merge, meld]
I say selectively so that it is clear that not everything from the original structures will remain.
- Fuse together