Is it ever a good idea to tell which company you will be moving on to? to your boss? your colleagues? Many of them will know soon via social networking (I.E. linkedin), but those aren't the ones that I would be concerned about. I realize that it's also a bad idea if there is any sort of non-compete agreement (even if it does not apply) or open hostility between the companies, but many times changing jobs within in a particular industry means going to a rival company. If so, to whom do you share this information - your boss? your entire team? HR (if they ask during an exit interview)?
edit: on a related note, when is it OK to ask a colleague where they will be moving to, or is it assumed that they will tell you if they want you to know?