I'm not sure about that. It was tragic that the weapons were used, or had to be used, but there were 2 consequences. On one hand the war was ended in a matter of days, and this saved the lives of millions of people on both sides. On the other hand, the true devastation of nuclear bombs was seen in actual action, not only their potential. This made concrete in everyone's mind the horror of a nuclear war, and in the long term it resulted in the nuclear weapons use taboo. If Hiroshima and Nagasaki did not happen, there's an almost certainty that at some point after WW2 one of the nuclear powers would have used its nukes against someone. Most likely, someone without nukes themselves. And by that time, it's quite likely that the devastation would have been orders of magnitude higher.