The basic theory behind "the first to give a number loses," from the job seeker's perspective, is that one might be "leaving money on the table" by naming a salary request. This viewpoint has a deeper root, however, in "positional bargaining," in which the two parties' interests are directly opposed and the relationship is adversarial.
A strict "positional bargaining" strategy, however, is usually not in the best interest of either party to the negotiation. Instead of worrying about who names the first number, do your homework. Determine in advance what your interests are and what you would be willing to accept. The overall package (including benefits, location, type of work, opportunities for advancement, etc.) consists of far more than just salary. Also consider what is typical for hiring someone of your skill level for the type of work you are doing for the type of company in that geographic area. I know that is a lot to consider, but if you do your research, you should be able to arrive at some conclusions.
At that point, you can be prepared for the salary negotiation without worrying about who names the first number. If you are at the point of salary negotiation, the company already wants to hire you. Get on the same side of the metaphorical table -- you are not adversaries! You are pursuing a mutually beneficial relationship. Talk about what is fair instead of simply making salary demands. If you can do this effectively, you can show that you are easy to work with while still maintaining your interests. Further, you make the discussion about the issues, not the people, so no one gets offended.
While I find it aggravating that some companies ask for salary history (which is often irrelevant to what is fair, given what I just stated), if you have to give it, do so. It really does not change the negotiation if you get on the same side of the table. If the employer is unwilling to negotiate in this manner, you may wish to reconsider whether you want to work for that employer anyway.
I realize this answer may be vague, but I'm trying to make the point that, with negotiation based on interests rather than positions, naming numbers becomes far less relevant.